This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cswiercz@jude abelfunctions] python abelfunctions/integralbasis.py | |
Tue Jul 29 10:37:15 2014 intbasis.profile | |
4005669 function calls (3810399 primitive calls) in 11.217 seconds | |
Ordered by: internal time | |
List reduced from 1296 to 10 due to restriction <10> | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
133971/68128 1.254 0.000 6.858 0.000 cache.py:78(wrapper) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cswiercz@jude abelfunctions] python abelfunctions/integralbasis.py | |
Tue Jul 29 10:51:06 2014 intbasis.profile | |
4736356 function calls (4502151 primitive calls) in 13.222 seconds | |
Ordered by: internal time | |
List reduced from 1293 to 10 due to restriction <10> | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
158684/76814 1.378 0.000 8.360 0.000 cache.py:78(wrapper) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/cswiercz/abelfunctions/abelfunctions/riemann_surface_path.so in abelfunctions.riemann_surface_path.RiemannSurfacePathLine.__init__ (abelfunctions/riemann_surface_path.c:6854)() | |
/Users/cswiercz/abelfunctions/abelfunctions/riemann_surface_path.so in abelfunctions.riemann_surface_path.RiemannSurfacePathPrimitive.__init__ (abelfunctions/riemann_surface_path.c:2891)() | |
/Users/cswiercz/abelfunctions/abelfunctions/riemann_surface_path.so in abelfunctions.riemann_surface_path.RiemannSurfacePathPrimitive.set_analytic_continuator (abelfunctions/riemann_surface_path.c:3061)() | |
/Users/cswiercz/abelfunctions/abelfunctions/analytic_continuation.so in abelfunctions.analytic_continuation.AnalyticContinuatorPuiseux.__init__ (abelfunctions/analytic_continuation.c:2616)() | |
/Users/cswiercz/abelfunctions/abelfunctions/analytic_continuation.so in abelfunctions.analytic_continuation.AnalyticContinuatorPuiseux._compute_puiseux_series (abelfunctions/analytic_continuation.c:3092)() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import sympy | |
import abelfunctions as ab | |
from sympy.abc import x,y | |
# construct a Riemann surface | |
f = -x**7 + 2*x**3*y + y**3 | |
X = ab.RiemannSurface(f,x,y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%matplotlib inline | |
import numpy | |
import sympy | |
from sympy.abc import x,y,t | |
from sympy import pprint | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
from mpl_toolkits.mplot3d import Axes3D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given a function, func(var), the map() function will apply func() to every | |
# element of a list and return a list of equal size. | |
def func(var): | |
return var**2 | |
numbers = [1,2,3,4] | |
squares = map(func, numbers) # [1,4,9,16] | |
# The multiprocessing module contains various objects for performing parallel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def variational_derivative(expr,u): | |
"""Returns the variational derivative of `expr` with respect to `u`. | |
Variational differentiation is a linear operator so we just need to | |
figure out how to differentiate a product of terms. | |
Parameters | |
---------- | |
expr : expression | |
u : function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import sympy | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib | |
from matplotlib import cm, colors | |
from matplotlib import pyplot as plt | |
branching_number = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sympy import isprime | |
from itertools import ifilter, count | |
def find_b(a): | |
"""Returns smallest b such that a^2 + b^2 is prime.""" | |
f = lambda b: isprime(a**2 + b**2) | |
g = ifilter(f, count()) | |
b = g.next() | |
return b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cswiercz@clavius vectors] clang++ ./construction.cpp && ./a.out | |
========================= | |
===== Experiment #1 ===== | |
========================= | |
Resizing and new element construction | |
-- v.resize(3) | |
-- resizing members | |
[#0] constructed |
OlderNewer