File: main.rules

package info (click to toggle)
polymake 3.2r4-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 22,564 kB
  • sloc: cpp: 153,464; perl: 40,590; ansic: 2,829; java: 2,654; python: 589; sh: 219; xml: 117; makefile: 63
file content (133 lines) | stat: -rw-r--r-- 4,787 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#  Copyright (c) 1997-2018
#  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
#  http://www.polymake.org
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 2, or (at your option) any
#  later version: http://www.gnu.org/licenses/gpl.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#-------------------------------------------------------------------------------


# @topic application
# This is the historically first application, and the largest one.
#
# It deals with convex pointed polyhedra.  It allows to define a polyhedron either as a convex hull of a point set, an intersection of
# halfspaces, or as an incidence matrix without any embedding.  Then you can ask for a plenty of its (especially combinatorial)
# properties,  construct new polyhedra by modifying it,  or study the behavior of the objective functions.
#
# There is a wide range of visualization methods for polyhedra, even for dimensions > 4 and purely combinatorial descriptions,
# including interfaces to interactive geometry viewers (such as [[wiki:external_software#JavaView|JavaView]] or [[wiki:external_software#geomview|geomview]]), generating
# PostScript drawings and povray scene files.

IMPORT common graph

USE topaz group ideal

HELP help.rules


# A polyhedral cone, not necessarily pointed.
# Note that in contrast to the vertices of a polytope, the [[RAYS]] are given in affine coordinates.
declare object Cone<Scalar=Rational> [ is_ordered_field(Scalar) ];

# Not necessarily bounded convex polyhedron, i.e., the feasible region of a linear program.
# Nonetheless, the name "Polytope" is used for two reasons: Firstly, as far as the combinatorics
# is concerned we always deal with polytopes; see the description of [[VERTICES_IN_FACETS]] for details.
# Note that a pointed polyhedron is projectively equivalent to a polytope.
# The second reason is historical.
# We use homogeneous coordinates, which is why Polytope is derived from [[Cone]].
# //Scalar// is the numeric data type used for the coordinates.
# @example To construct a polytope as the convex hull of three points in the plane use
# > $p=new Polytope(POINTS=>[[1,0,0],[1,1,0],[1,0,1]]);
# > print $p->N_FACETS
# | 3
# Note that homogeneous coordinates are used throughout.
#
# @example Many standard constructions are available directly.  For instance, to get a regular 120-cell (which is 4-dimensional) use:
# > $c=regular_120_cell();
# > print $c->VOLUME;
# | 1575+705r5
# This is the exact volume 1575+705*\sqrt{5}.
# polymake has limited support for polytopes with non-rational coordinates.
declare object Polytope<Scalar=Rational> [ is_ordered_field(Scalar) ] : Cone<Scalar>;


# these rules are intrinsic: they don't depend on any external software to be installed separately
INCLUDE
  cone_properties.rules  
  polytope_properties.rules
  lp_properties.rules
  initial.rules
  cone_common.rules
  incidence_perm.rules
  common.rules
  lp.rules
  to.rules
  unbounded_polyhedron.rules
  rational.rules
  float.rules
  solids.rules
  flag_vector.rules
  lattice.rules
  vector_configuration.rules
  point_configuration.rules
  polarize.rules
  visual.rules
  stl.rules  
  schlegel.rules
  visual_graph.rules
  gale.rules
  steiner.rules
  voronoi.rules
  tight_span.rules
  propagated_polytope.rules
  edge_orientable.rules
  visual_point_configuration.rules
  action.rules
  group.rules
  coxeter.rules  
  quotient_space.rules
  symmetrized_cocircuit_equations.rules
  universal_polytope.rules
  arbitrary_coords.rules
  representations.rules
  orbit_polytope.rules
  orbit_polytope_helpers.rules
  orbit_polytope_visual.rules
  wronski.rules

# self-configuring rules
INCLUDE
  postscript.rules
  common::geomview.rules
  topcom.rules
  azove.rules

# @category Convex hull computation
# Use the //double description// method as implemented in [[wiki:external_software#cddlib]].
# It is the default algorithm for computation of facets from points or dually.
# It operates with arbitrary precision arithmetic ([[wiki:external_software#GMP]]).
label cdd

# @category Convex hull computation
# Use the //reverse search// method, as implemented in [[wiki:external_software#lrslib]].
label lrs

# @category Convex hull computation
# Use the convex hull code implemented in [[wiki:external_software#ppl]].
label ppl

prefer *.convex_hull ppl, cdd, lrs, beneath_beyond


# Local Variables:
# mode: perl
# cperl-indent-level: 3
# indent-tabs-mode:nil
# End: