#6371: Implement Riemann theta functions
-----------------------------------------------+----------------------------
Reporter: ncalexan | Owner: cswiercz
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-4.8
Component: numerical | Keywords: riemann theta
klein
Work_issues: | Upstream: N/A
Reviewer: Marco Streng, Bernard Deconinck | Author: Nick
Alexander, Chris Swierczewski
Merged: | Dependencies:
-----------------------------------------------+----------------------------
Comment(by cswiercz):
Replying to [comment:29 was]:
> Chris: Have you read #10570? That explains what this test is about
and why it is important. Your code evidently gets imported when Sage
starts up, and does something potentially leaky.
Yes, I read this ticket but I'm not sure how to resolve the "potential
leakiness".
One candidate for where this issue might be coming from is my use of a
class constructor. I have some code in {{{riemann_theta.py}}} in the
following form:
{{{
def RiemannTheta_Constructor(foo, bar):
class RiemannTheta(Function_RiemannTheta):
def __init__(...):
self.foo = foo
self.bar = bar
Function_RiemannTheta.__init__()
return RiemannTheta(...)
RiemannTheta = RiemannTheta_Constructor
class Function_RiemannTheta(BuiltinFunction):
...
}}}
I needed to do things this way so I could parameterize {{{RiemannTheta}}}
by things such as directional derivative and Riemann matrix. Otherwise,
things behave not as expected due to the way {{{BuiltinFunction}}}
behaves. (For example, two instances of {{{RiemannTheta}}} would share the
same Riemann matrix or derivatives.) With the above code structure I found
that these issues don't arise and two instances of {{{RiemannTheta}}}
behaved independently as expected.
I'd hate to introduce memory leaks due to my lack of understanding of
{{{BuiltinFunction}}}. (Granted, the documentation for creating classes
that inherit {{{BuiltinFunction}}} is severely lacking as well.) However,
I don't see how I'd start fixing the issue aside from increasing
{{{len(frames)}}} in the error message above from 11 to 26. Any suggested
resources on how I could better perform what I'm doing in the class and
function construction above? Again, the {{{BuiltinFunction}}}
documentation wasn't helpful beyond copying what preexisting inheritors in
{{{sage.functions}}} do.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6371#comment:30>
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.