Ask Your Question

Revision history [back]

No reference is given within Sage source code, however the construction seems straightforward: vertices, rays and lines are processed independenltly. To access its source code, you just have to add a double question mark on method as follows:

sage: P1 = Polyhedron(vertices = [[1,1], [2,3], [3,0]], rays = [[3,2], [5,2]])
sage: P2 = Polyhedron(vertices = [[6,0]], rays = [[1,9], [1,3]])
sage: P1.product??

You will first see the documentation of the method, and then the program. As you will see, this part of Sage is written in pure Python and is very readable. If you have any problem in understanding a point, please do not hesitate to ask.

No reference is given within Sage source code, however the construction seems straightforward: vertices, rays and lines are processed independenltly. code. To access its source code, you just have to add a double question mark on method as follows:

sage: P1 = Polyhedron(vertices = [[1,1], [2,3], [3,0]], rays = [[3,2], [5,2]])
sage: P2 = Polyhedron(vertices = [[6,0]], rays = [[1,9], [1,3]])
sage: P1.product??

You will first see the documentation of the method, and then the program. As you will see, this part of Sage is written in pure Python and is very readable. Moreover, the construction seems straightforward: vertices, rays and lines are processed independenltly. If you have any problem in understanding a point, particular point of the code, please do not hesitate to ask.