Dear all,

I got already nice feedback from Michael Joswig, one of the heads of
polymake. He said he liked the idea, but they are probably going for
Singular. A very clever choice indeed -- I didn't think of that one. It
probably would make sense to look at Singulars functionality and see how it
compares with axioms.

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

Apart from that I have the following design problem:

I have a domain which contains polytopes. 

)abbrev domain POLYTOPE Polytope
Polytope(): Exports == Implementation where
    Exports == with

-------------------------------------------------------------------------------
--               polytope constructions                                      --
-------------------------------------------------------------------------------

      cube: Integer -> %

      randSphere: (Integer, Integer) -> %

-------------------------------------------------------------------------------
--               polytope properties                                         --
-------------------------------------------------------------------------------

      hvector: % -> List Integer

      vertices: % -> Matrix ???

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.

Now one solution is simply to parametrize the domain:

)abbrev domain POLYTOPE Polytope
Polytope(R: Ring): Exports == Implementation where
    Exports == with

-------------------------------------------------------------------------------
--               polytope constructions                                      --
-------------------------------------------------------------------------------

      cube: Integer -> %

      if R is Float then randSphere: (Integer, Integer) -> %

      vertices: % -> Matrix R

However, I'm not convinced that this is the best solution. One reason being,
that I don't really want that the user has to specify the type of his polytope
all the time.

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

So here is the second idea:

have a package 

)abbrev domain POLYCON PolytopeConstructions
PolytopeConstructions(): Exports == Implementation where
    Exports == with

      cube: Integer -> Polytope Integer

      randSphere: (Integer, Integer) -> Polytope Float

and a parametrized domain as above. I'm not sure whether this is sensible,
either

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

Third idea:

Make all vertices have coordinates of type Fraction Integer. If they happen to
be integers, they can be converted afterwards anyway. It is highly unlikely
that there will be anything around that does not have rational vertices.

-------------------------------------------------------------------------------

So what do you think?

Martin




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

Reply via email to