#10132: Differential Geometry via Sage
------------------------------------+---------------------------------------
Reporter: mikarm | Owner: mhampton
Type: enhancement | Status: new
Priority: major | Milestone:
Component: geometry | Keywords: differential geometry,
parametrized surface
Author: Mikhail Malakhaltsev | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------------+---------------------------------------
Comment(by jvkersch):
I've uploaded a new version of the patch, together with Mikhail's original
worksheet. The main changes are in the functions that compute invariants,
such as `natural_frame`, `first_fundamental_form`, etc.
I thought it would be better to have, for each set of invariants, three
member functions with specific aims. To compute the first fundamental
form (for instance) the hard work is done in a cached member function
`_compute_first_fundamental_form_coefficient` which computes one
component.
The interaction with the user is done through two other member functions:
first, there is `first_fundamental_form_coefficient_new` which does some
sanity checking on the index of the component to compute, raises an
exception if the index is out of bounds, and calls `_compute_...` to do
the work. Secondly there is also a member function
`first_fundamental_form_coefficients_new` which creates a dictionary with
all the components.
I think that this "division of labor" makes it easier to optimize the
result, make sure that the arguments are valid, and above all avoids code
duplication. At the same time, I did not want to overhaul the design of
the entire code, so I've replaced only a few functions in this vein. If
you agree that this is a good design, we can tackle the remaining
functions.
For the sake of comparison, I've labeled my additions with the suffix
`_new` and I've left the original implementations in the file as well. In
the worksheet, I've added some timing commands to see the difference in
timing between the original and new implementations.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10132#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.