axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] Axiom Design Question / Polymake feedback


From: Page, Bill
Subject: RE: [Axiom-developer] Axiom Design Question / Polymake feedback
Date: Wed, 24 Aug 2005 10:29:03 -0400

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]