Subject: Mathemagix
List archive
- From: Bernard Mourrain <address@concealed>
- To: address@concealed
- Subject: Re: [Mathemagix] A few design choices
- Date: Tue, 11 Dec 2007 13:39:35 +0100
Joris van der Hoeven wrote:
On Mon, Dec 10, 2007 at 05:17:22PM +0100, Bernard Mourrain wrote:What about generic functions which applies for dense_univariate_polynomial or bezier_univariate_polynomial
In the first case, an interest is that the code can be reused more easily.
For instance, if one want to manipulate polynomials in the bernstein basis on a interval [a,b]
the container will be = [array of coeff. + size + a,b]
and the operations on this representation will be linked to the bernstein basic operations at the interface class level.
(In the other approach a specific class has to be rewritten).
This gives a way to use general functions on all dense polynomials, whereas in the other case, helpers have to be developed, case by case.
I don't agree. In the case of algebramix, it suffices to template
over the polynomial type. You may then instantiate by polynomials
of whatever representation you wish.
but not sparse_multivariate_polynomial ?
I suggest to put them in namespaces (see VECTDSE, MATRDSE, MPOLDSE, ... in algebrix).
OK, so for polynomials should we use:What about multivariate polynomials or sparse structures: should the type of the monomials be attached to the class ?
Yes (or as a template parameter, or in the variant),
because it is part of the implementation.
The path that you propose requires the current class names to be more explicit:
vector -> dense_vector
matrix -> dense_matrix
structured_matrix
sparse_matrix (with many possible formats)
Yes.
dense_univariate_polynomial
bezier_univariate_polynomial
...
sparse_multivariate_polynomial
...
Any convention to adopt, in order to prepare the transition?
B.
- Re: [Mathemagix] A few design choices, Bernard Mourrain, 12/10/2007
- Re: [Mathemagix] A few design choices, Joris van der Hoeven, 12/10/2007
- Re: [Mathemagix] A few design choices, Bernard Mourrain, 12/11/2007
- Re: [Mathemagix] A few design choices, Joris van der Hoeven, 12/11/2007
- Re: [Mathemagix] A few design choices, Bernard Mourrain, 12/11/2007
- Re: [Mathemagix] A few design choices, Joris van der Hoeven, 12/10/2007
Archive powered by MHonArc 2.6.18.