Okay the last blog was more of how I got introduced to the program and more of like a story. During the past week we had few targets one was this blog, second the development workflow, and third discussing the structure of the code. First the blog was set.
Now coming to the development workflow. We had these options
Clone the Sage source from github onto local system, then run the make. Once this was done we had the local system which had Sage in it. Now whenever I edited the code I could just do a sage -b (which builds Sage with the changes made) and in the same way test the code by using sage -t. And once the tests passed I could send a pull request against my mentor’s branch on github. This was the thing we finally settled down with.
The other was to create a ticket on the Trac server and then push the code frequently onto the Ticket created. But I was a bit comfortable with github so choose that over this. However it was made sure that after sufficient code has been pushed onto github we can create intermediate tickets on Sage Trac Server which would make review as well as maintenance easy.
The next target was to analyse the various knot software already present. So I started with Seifert Matrix Implementation which would take braid word representation as input. Here given the dimension we wanted to edit the elements of the matrix. So we initialized a zero matrix and would be working on editing the elements according to the algorithm, the parts of which would include components, invariants as outputs . This eventually forms the first few weeks of work during the coding period. Here’s the snippet which we can use in Sage to create an empty matrix and further edit the elements. Just had some loops and conditionals in there.
sage: A = matrix(QQ, 2, 3)
sage: A
[0 0 0]
[0 0 0]
sage: A[1,2] = 1
sage: A
[0 0 0]
[0 0 1]
sage: for i in range(0,1):
….: for j in range(0,2):
….: if(A[i,j]==0):
….: A[i,j] = 5*i + 8*j
….:
sage: A
[0 8 0]
[0 0 1]
During the later parts of the week, I started to look through Spherogram which had a Link class and Rknots package which mostly works on taking 3D inputs and working on them to calculate various results related to knot theory.
In the coming weeks the focus would be on further strengthening the ideas used in Spherogram, however the coding design of Spherogram is a bit of concern to directly import it into Sage as it uses classes for internal representation. I guess we could work on this and as well structure the data structure part and hopefully come to some constructive conclusion on this issue.
On similar par lines the code in Rknots is pretty much extensive and I have started to read code in R language. Till now it has been fascinating, now I need to dig deeper to understand it in greater detail. As as of now, methods which would get mostly integrated look like PCA projection and getcoordinates methods. Thanks for reading through.