Re: [sage-devel] Re: Piecewise affine functions

2018-11-09 Thread Matthias Koeppe
Not sure if there should be a class Function from which you inherit. I would think PiecewiseFunctions should tie in with Sage's category framework. There's http://doc.sagemath.org/html/en/reference/categories/sage/categories/map.html#sage.categories.map.Map On Thursday, November 8, 2018 at

Re: [sage-devel] Re: Piecewise affine functions

2018-11-08 Thread Vincent Delecroix
Le 08/11/2018 à 11:37, Xavier Caruso a écrit : By the way, I noticed that there is no particular support for real valued functions in Sage (except if I missed something). At least End(RR) returns the "Set of*Homomorphisms* from Real Field ... to Real Field ...". Shouldn't we implement this?

Re: [sage-devel] Re: Piecewise affine functions

2018-11-08 Thread Xavier Caruso
Le lundi 5 novembre 2018, Vincent Delecroix a écrit : > If you want to support composition of functions then you want to be > able to take images of "nice sets" by "nice maps". In other words, > you need a theory that supports quantifier elimination (see e.g. [1]). > In the situation discussed by

Re: [sage-devel] Re: Piecewise affine functions

2018-11-05 Thread Vincent Delecroix
Le 05/11/2018 à 19:30, Michael Orlitzky a écrit : On 11/05/2018 07:26 AM, Xavier Caruso wrote: Hello, ... So IMHO, it makes sense (and it would be easier to review) to have two separated tickets, one for univariate functions and one for multivariate functions. Don't you agree? I think the

Re: [sage-devel] Re: Piecewise affine functions

2018-11-05 Thread Michael Orlitzky
On 11/05/2018 07:26 AM, Xavier Caruso wrote: > Hello, > ... > > So IMHO, it makes sense (and it would be easier to review) to have two > separated tickets, one for univariate functions and one for multivariate > functions. Don't you agree? I think the right design for piecewise functions is to

Re: [sage-devel] Re: Piecewise affine functions

2018-11-05 Thread Xavier Caruso
Hello, (Sorry for replying so late...) Le vendredi 26 octobre 2018, Matthias Koeppe a écrit : > Though it sounds like you only need piecewise functions of a single > real variable, I would suggest to make the ticket for piecewise linear > (or polynomial) functions of several variables. While

Re: [sage-devel] Re: Piecewise affine functions

2018-10-26 Thread Matthias Koeppe
Though it sounds like you only need piecewise functions of a single real variable, I would suggest to make the ticket for piecewise linear (or polynomial) functions of several variables. The current implementation of piecewise in Sage is tied to the general symbolics in the symbolic ring.

Re: [sage-devel] Re: Piecewise affine functions

2018-10-25 Thread Xavier Caruso
Le vendredi 19 octobre 2018, Matthias Koeppe a écrit : > Ticket (for piecewise linear functions, polyhedral domains) at  > https://trac.sagemath.org/ticket/26512 Thanks for opening this ticket. I went through your code. I guess that what I need is essentialy the classes "FastLinearFunction" and

Re: [sage-devel] Re: Piecewise affine functions

2018-10-19 Thread Matthias Koeppe
Ticket (for piecewise linear functions, polyhedral domains) at https://trac.sagemath.org/ticket/26512 On Friday, October 19, 2018 at 4:00:53 AM UTC-5, Dima Pasechnik wrote: > > On Fri, Oct 19, 2018 at 4:08 AM Matthias Koeppe > > wrote: > > > > Xavier, > > > > For code for piecewise linear

Re: [sage-devel] Re: Piecewise affine functions

2018-10-19 Thread Michael Orlitzky
On 10/19/2018 06:20 AM, Samuel Lelievre wrote: > Thanks Xavier for bringing this up. > > Piecewise-defined functions do need work in Sage. > > Related tickets and discussions: > >   ... > I can add to that list (the SEP is probably outdated now):

[sage-devel] Re: Piecewise affine functions

2018-10-19 Thread Samuel Lelievre
Thanks Xavier for bringing this up. Piecewise-defined functions do need work in Sage. Related tickets and discussions: https://trac.sagemath.org/query?order=id=1=~piecewise https://trac.sagemath.org/wiki/symbolics#limitationsofPiecewisefunctions

Re: [sage-devel] Re: Piecewise affine functions

2018-10-19 Thread Vincent Delecroix
Matthias, Xavier, Having piecwise affine function of [0,1] would be cool for implementing the Thomson group! For higher dimensional functions it is much more subtle (a 1-dim polytope is just an interval). Though, I am +1 on having in mind that this has to be extended to more variables. Best

Re: [sage-devel] Re: Piecewise affine functions

2018-10-19 Thread Dima Pasechnik
On Fri, Oct 19, 2018 at 4:08 AM Matthias Koeppe wrote: > > Xavier, > > For code for piecewise linear functions of several variables, see here: > https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/piecewise_functions.sage > I'd be quite interested in getting something like this

[sage-devel] Re: Piecewise affine functions

2018-10-18 Thread Matthias Koeppe
Xavier, For code for piecewise linear functions of several variables, see here: https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/piecewise_functions.sage I'd be quite interested in getting something like this into sage. There's no ticket for this yet. Also, you might be