[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [polymake]
From: |
kratt6 |
Subject: |
[Axiom-developer] [polymake] |
Date: |
Fri, 26 Aug 2005 16:56:01 -0500 |
Changes http://page.axiom-developer.org/zope/mathaction/Polymake/diff
--
++added:
\begin{axiom}
)lib STRCNV READFILE
\end{axiom}
++added:
Cardinal ==> NonNegativeInteger
Scalar ==> Fraction Integer
--removed:
- facets: % -> Matrix Integer
-
- vertices: % -> Matrix Integer
-
++added:
points: % -> Matrix Scalar
++ Points such that the polyhedron is their convex hull. Redundancies are
++ allowed. Vector (x0 x1 .. xd) represents a point in (d+1)-space
++ (homogeneous coordinates.) Affine points are identified by x0 >
++ 0. Points with x0 = 0 can be interpreted as rays. polymake
++ automatically normalizes each coordinate vector, dividing them by the
++ first non-zero element. The clients and rule subroutines can always
++ assume that x0 is either 0 or 1. Dual to INEQUALITIES. Input section
++ only. Ask for VERTICES if you want to compute a V-representation from
++ an H-representation.
vertices: % -> Matrix Scalar
++ Vertices of the polyhedron. No redundancies are allowed. The
++ coordinates are normalized the same way as POINTS. Dual to FACETS.
inequalities: % -> Matrix Scalar
++ Inequalities that describe half-spaces such that the polyhedron is
++ their intersection. Redundancies are allowed. Dual to POINTS. A
++ vector (A0 A1 .. Ad) defines the (closed affine) half-space of points
++ (1,x1,..,xd) such that A0 + A1 x1 + .. + Ad xd >= 0. Input section
++ only. Ask for FACETS and AFFINE_HULL if you want to compute an
++ H-representation from a V-representation.
facets: % -> Matrix Scalar
++ Facets of the polyhedron, encoded as INEQUALITIES. Dual to VERTICES.
equations: % -> Matrix Scalar
++ Equations that hold for all points of the polyhedron. A vector (A0 A1
++ .. Ad) describes the hyperplane of all points (1,x1,..,xd) such that
++ A0 + A1 x1 + .. + Ad xd = 0. Input section only. Ask for AFFINE_HULL
++ if you want to see an irredundant description of the affine span.
affineHull: % -> Matrix Scalar
++ Dual basis of the affine hull of the polyhedron.
vertexNormals: % -> Matrix Scalar
++ The i-th row is the normal vector of a hyperplane separating the i-th
++ vertex from the rest ones. This property is a by-product of redundant
++ point elimination algorithm.
validPoint: % -> Vector Scalar
++ Some point belonging to the polyhedron.
dim: % -> Cardinal
++ Dimension of the affine hull of the polyhedron = dimension of the
++ polyhedron. If the polytope is given purely combinatorically, it's the
++ dimension of a minimal embedding space deduced from the combinatorial
++ structure.
ambientDim: % -> Cardinal
++ Dimension of the space where the polyhedron lives in.
feasible: % -> Boolean
++ True if the polyhedron is not empty.
pointed: % -> Boolean
++ True if the polyhedron does not contain an affine line.
farFace: % -> Set Cardinal
++ Indices of vertices that are rays.
unboundedFacets: % -> Set Cardinal
++ Indices of facets that are unbounded.
bounded: % -> Boolean
++ True if the polyhedron is a bounded polytope.
-- boundedGraph: % -> Graph
-- ++ Graph of the bounded subcomplex.
centered: % -> Boolean
++ True if (1,0,0,..) is a relative interior point. Polar to BOUNDED.
positive: % -> Boolean
++ True if all vertices of the polyhedron have non-negative coordinates,
++ that is, it lies entirely in the positive orthant.
++added:
polydir: String := "/tmp/"
polytmp: String := polydir "tmp.poly"
polylib: String := "/usr/local/polymake/bin/"
polytmpfile:FileName := polytmp::FileName
??changed:
- String2ListInteger: String -> List Integer
-
- String2ListInteger r ==
- map(PARSE_-INTEGER(#1)$Lisp, split(r, char(" "))$String)_
- $FiniteLinearAggregateFunctions2(String, List String, Integer, _
- List Integer)
-
- getBoolean: () -> Boolean
-
- getBoolean ==
- f := open(("/tmp/tmp.poly")::FileName)$TextFile
- read!(f)$TextFile
- r:String := read!(f)$TextFile
- close!(f)$TextFile
-
- (r="1")
-
- getIntegerList: () -> List Integer
-
-[25 more lines...]
polycons: (String, String, String) -> %
polycons(rep, cmd, prm) ==
systemCommand("system " polylib cmd " " polydir rep ".poly " prm)_
$MoreSystemCommands
rep::Rep
polyprop: (%, String) -> Void
polyprop(rep, cmd) ==
systemCommand("system " polylib "polymake " polydir (rep::Rep) ".poly "_
cmd " > " polytmp)$MoreSystemCommands
??changed:
- s: String := "cube" string(n)
- systemCommand("system /usr/local/polymake/bin/cube " s ".poly "
string(n))$MoreSystemCommands
- s::Rep
polycons("cube" string(n), "cube", string(n))
??changed:
- s: String := "cross" string(n)
- systemCommand("system /usr/local/polymake/bin/cross " s ".poly "
string(n))$MoreSystemCommands
- s::Rep
-
- rand01(d, n) ==
- s: String := "rand01" string(d) string(n)
- systemCommand("system /usr/local/polymake/bin/rand01 " s ".poly "
string(d) " " string(n))$MoreSystemCommands
- s::Rep
-
- randSphere(d, n) ==
- s: String := "randsphere" string(d) string(n)
- systemCommand("system /usr/local/polymake/bin/rand__sphere " s ".poly
" string(d) " " string(n))$MoreSystemCommands
- s::Rep
polycons("cross" string(n), "cross", string(n))
rand01(d, n) ==
polycons("rand01" string(d) string(n), "rand01", _
string(d) " " string(n))
randSphere(d, n) ==
polycons("randsphere" string(d) string(n), "rand__sphere", _
string(d) " " string(n))
??changed:
- systemCommand("system /usr/local/polymake/bin/polymake " (s::Rep)
".poly F__VECTOR > /tmp/tmp.poly")_
- $MoreSystemCommands
-
- getIntegerVector()
polyprop(s, "F__VECTOR")
getVectorInteger(polytmpfile)$ReadFile
??changed:
- systemCommand("system /usr/local/polymake/bin/polymake " (s::Rep)
".poly F2__VECTOR > /tmp/tmp.poly")_
- $MoreSystemCommands
-
- getIntegerMatrix()
polyprop(s, "F2__VECTOR")
getMatrixInteger(polytmpfile)$ReadFile
??changed:
- systemCommand("system /usr/local/polymake/bin/polymake " (s::Rep)
".poly H__VECTOR > /tmp/tmp.poly")_
- $MoreSystemCommands
-
- getIntegerVector()
-
- facets s ==
- systemCommand("system /usr/local/polymake/bin/polymake " (s::Rep)
".poly FACETS > /tmp/tmp.poly")_
- $MoreSystemCommands
-
- getIntegerMatrix()
polyprop(s, "H__VECTOR")
getVectorInteger(polytmpfile)$ReadFile
simple s ==
polyprop(s, "SIMPLE")
getBoolean(polytmpfile)$ReadFile
points s ==
polyprop(s, "POINTS")
getMatrixFraction(polytmpfile)$ReadFile
??changed:
- systemCommand("system /usr/local/polymake/bin/polymake " (s::Rep)
".poly VERTICES > /tmp/tmp.poly")_
- $MoreSystemCommands
-
- getIntegerMatrix()
-
- simple s ==
- systemCommand("system /usr/local/polymake/bin/polymake " (s::Rep)
".poly SIMPLE > /tmp/tmp.poly")_
- $MoreSystemCommands
-
- getBoolean()
-
-)abbrev domain TOPAZ SimplicialComplex
-SimplicialComplex(): Exports == Implementation where
- Exports == with
-
- coerce: % -> OutputForm
-
--------------------------------------------------------------------------------
--- topaz constructions --
-[59 more lines...]
polyprop(s, "VERTICES")
getMatrixFraction(polytmpfile)$ReadFile
inequalities s ==
polyprop(s, "INEQUALITIES")
getMatrixFraction(polytmpfile)$ReadFile
facets s ==
polyprop(s, "FACETS")
getMatrixFraction(polytmpfile)$ReadFile
equations s ==
polyprop(s, "EQUATIONS")
getMatrixFraction(polytmpfile)$ReadFile
affineHull s ==
polyprop(s, "AFFINE__HULL")
getMatrixFraction(polytmpfile)$ReadFile
vertexNormals s ==
polyprop(s, "VERTEX__NORMALS")
getMatrixFraction(polytmpfile)$ReadFile
validPoint s ==
polyprop(s, "VALID__POINT")
getVectorFraction(polytmpfile)$ReadFile
dim s ==
polyprop(s, "DIM")
getInteger(polytmpfile)$ReadFile :: Cardinal
ambientDim s ==
polyprop(s, "AMBIENT__DIM")
getInteger(polytmpfile)$ReadFile :: Cardinal
feasible s ==
polyprop(s, "FEASIBLE")
getBoolean(polytmpfile)$ReadFile
pointed s ==
polyprop(s, "POINTED")
getBoolean(polytmpfile)$ReadFile
farFace s ==
polyprop(s, "FAR__FACE")
map(#1 pretend Cardinal, getSetInteger(polytmpfile)$ReadFile)_
$FiniteSetAggregateFunctions2(Integer, Set Integer,
Cardinal, Set Cardinal)
unboundedFacets s ==
polyprop(s, "UNBOUNDED__FACETS")
map(#1 pretend Cardinal, getSetInteger(polytmpfile)$ReadFile)_
$FiniteSetAggregateFunctions2(Integer, Set Integer,
Cardinal, Set Cardinal)
bounded s ==
polyprop(s, "BOUNDED")
getBoolean(polytmpfile)$ReadFile
centered s ==
polyprop(s, "CENTERED")
getBoolean(polytmpfile)$ReadFile
positive s ==
polyprop(s, "POSITIVE")
getBoolean(polytmpfile)$ReadFile
--removed:
-
??changed:
-c4:=cube 4
-hVector c4
c := cube 4
systemCommand("system cat /tmp/cube4.poly")$MoreSystemCommands
++added:
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden