#8321: numerical integration with arbitrary precision
-------------------------+--------------------------------------------------
Reporter: burcin | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7.2
Component: symbolics | Keywords: numerics,integration
Work_issues: | Upstream: N/A
Reviewer: | Author: Stefan Reiterer
Merged: | Dependencies:
-------------------------+--------------------------------------------------
Comment(by fredrik.johansson):
Replying to [comment:39 benjaminfjones]:
> Replying to [comment:38 fredrik.johansson]:
> > The singleton trick definitely needs to be implemented; it can save a
factor 4x or more.
>
> I understand what you are saying about the class being instantiated on
every call. Can you explain what you mean by the "singleton trick"?
To make a class singleton, add something like this (warning: untested):
{{{
instance = None
def __new__(cls, *args, **kwargs):
if not cls.instance:
cls.instance = super(ThisClass, cls).__new__(cls, *args,
**kwargs)
return cls.instance
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8321#comment:40>
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.