oldk1331 wrote:
> 
> On Aug 1, 2016 10:38 PM, "Waldek Hebisch" <[email protected]> wrote:
> >
> > There is U32Matrix, DoubleFloatMatrix, ComplexDoubleFloatMatrix.
> 
> They don't apply to this domain.

What do you mean by "don't apply":

(3) -> bP := BezoutMatrix(Integer, SUP(Integer), U32Matrix, U32Vector, 
U32Vector)

   (3)
  BezoutMatrix(Integer,SparseUnivariatePolynomial(Integer),U32Matrix,U32Vector,
  U32Vector)
                                                                   Type: Type
(4) -> p := (x^3+1)::SUP(INT)

         3
   (4)  ?  + 1
                                    Type: SparseUnivariatePolynomial(Integer)
(5) -> q := (x^2+x + 1)::SUP(INT)    

         2
   (5)  ?  + ? + 1
                                    Type: SparseUnivariatePolynomial(Integer)
(6) -> sylvesterMatrix(p, q)$bP

        +1  0  0  1  0+
        |             |
        |0  1  0  0  1|
        |             |
   (6)  |1  1  1  0  0|
        |             |
        |0  1  1  1  0|
        |             |
        +0  0  1  1  1+
                                                              Type: U32Matrix

> 
> > And users may add their own domains.
> 
> That's the problem. Take List as an example, if there's
> another implementation of ListAggregate, should
> we generalize usage of List to ListAggregate?

Well:
1) maybe, in particular if generalization is cheap
2) we have IndexedList, but beyond that there is little
   which can be done to generalize lists
3) list operations benefit a lot from inlining.  In generic
   code inlinig is impossible

Basicaly, parametrised code is slower and requires specifying
type parameters, but can be used in more situations that
code tied to specific types.  Which is more important
sometimes is clear but in other cases is just a personal
judgement.  My policy is "if not sure about change
keep things unchanged".

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to