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: Ralf Hemmecke
Subject: Re: [Axiom-developer] Axiom Design Question / Polymake feedback
Date: Thu, 25 Aug 2005 11:13:02 +0200
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

> )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.

If you don't like it and you can somehow determine the type of R automatically, and it is something simple like Integer then why not writing

Polytope(): Exports == Implementation where
    Exports == with
      vertices: % -> (R: Ring, Matrix R);
      ...

That should work in Axiom (+ dependent types).

By the way, is there a reason for constructing a nullary function Polytop() instead of just the constant Polytope? (Sorry, I have not looked at polymake.)

Ralf




reply via email to

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