Martin,

On Wednesday, August 24, 2005 8:49 AM you wrote:
> ... 
> Now the problem is as follows: the type of the elements of the
> matrix depends on the polytope. For some polytopes, they are
> Integers, for others rationals or floats, or both.

Ideally, I think you might want to return something like:

vertices: % -> Matrix Union (Integer, Float, Fraction Integer)

but unfortunately Axiom does not understand that domain
Union (Integer, Float, Fraction Integer) is actually a RING so
you are not allowed to call it a Matrix.

Instead you might use, for example:

vertices: % -> List List Union (Integer, Float, Fraction Integer)

or maybe

vertices: % -> TwoDimensionalArray Union (Integer, Float, Fraction
Integer)

but note that for some reason

(11) -> x: TwoDimensionalArray Union (Integer, Float, Fraction Integer)
:=new(2,2,0)

   (1)  [0,0,0,0]
          Type: TwoDimensionalArray Union(Integer,Float,Fraction
Integer)

does not print properly (as an rectangular array).

I think there are two possible bug reports here:

1) Union ( list of alternatives that are coercible to some ring )
   should be a RING

2) display of TwoDimensionalArray of type Union(...) is not properly
   formatted

Do you agree?

Regards,
Bill Page.



_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to