On 11/30/2012 10:12 PM, Jason Grout wrote:
> 
> Is there something better?  I tried to get piecewise to work, but I 
> couldn't plot, integrate, etc., the function.
> 

I've collected a lot of code over the years for working with piecewise
functions, but most of it was written before I knew anything about sage
development. I've made myself a note to clean some of it up and
document/test it, after which I'll add it to my init.sage repo and
others can reuse it.

Most of this stuff does properly belong in the PiecewisePolynomial
class, but work on that class is just treading water.

Just an idea:

$ grep 'def ' piecewise.py
def is_piecewise(expr):
def remove_zero_length_intervals(intervals):
def function_at_point(p, x0):
def interval_contains(interval, x0):
def defined_at(p, x0):
def differentiate(p, variable, degree):
def multiply(p, multiplier):
def divide(p, divisor):
def subtract(p, subtrahend):
def exponentiate(p, exponent):
def subtract_piecewise_uniform(p1, p2):
def divide_piecewise_uniform(p1, p2):
def add_piecewise_uniform(p1, p2):
def multiply_piecewise_uniform(p1, p2):
def reinterval(p, intervals):
def add_piecewise(p1, p2):
def subtract_piecewise(p1, p2):
def divide_piecewise(p1, p2):
def add_var_to_range(var, r):
def multiply_piecewise(p1, p2):
def plot3d(p, yrange):
def double_eval(f,x,y):
def append(p1, p2):
def split_intervals(p1, p2):
def substitute_expression(p, expr):
def derivative(p, expr, k):
def make_piecewise(f, intervals):
def abs(p):
def integrate(p, var_name, a, b):
def nintegrate(p):

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to