File: point_configuration_properties.rules

package info (click to toggle)
polymake 4.12-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 35,992 kB
  • sloc: cpp: 168,768; perl: 43,375; javascript: 31,575; ansic: 3,007; java: 2,654; python: 633; sh: 268; xml: 117; makefile: 61
file content (182 lines) | stat: -rw-r--r-- 6,011 bytes parent folder | download | duplicates (2)
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#  Copyright (c) 1997-2024
#  Ewgenij Gawrilow, Michael Joswig, and the polymake team
#  Technische Universität Berlin, Germany
#  https://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.
#-------------------------------------------------------------------------------

object PointConfiguration {


file_suffix pc

# @category Input property
# The points of the configuration.  Multiples allowed.
property POINTS = override VECTORS;

# @category Visualization
# Unique names assigned to the [[POINTS]].
property POINT_LABELS = override LABELS;

# @category Geometry
# Tells if multiple points exist.
property MULTIPLE_POINTS = override MULTIPLE_VECTORS;

# @category Geometry
# The polytope being the convex hull of the point configuration.
property CONVEX_HULL : Polytope<Scalar> {

   # Indices of [[Polytope::VERTICES]] of the [[CONVEX_HULL]] as [[POINTS]].
   property VERTEX_POINT_MAP : Array<Int>;

   rule VERTEX_POINT_MAP : VertexPerm.VERTEX_POINT_MAP, VertexPerm.PERMUTATION {
     $this->VERTEX_POINT_MAP=permuted($this->VertexPerm->VERTEX_POINT_MAP, $this->VertexPerm->PERMUTATION);
   }
   weight 1.10;

}

# @category Geometry
# Affine dimension of the point configuration.
# Similar to [[Polytope::DIM]].
# @return Int
user_method DIM() : VECTOR_DIM {
   return $_[0]->VECTOR_DIM-1;
}

# @category Geometry
# Ambient dimension of the point configuration (without the homogenization coordinate).
# Similar to [[Polytope::AMBIENT_DIM]].
# @return Int
user_method AMBIENT_DIM() : VECTOR_AMBIENT_DIM {
   return $_[0]->VECTOR_AMBIENT_DIM-1;
}

# @category Geometry
# True if the point configuration is bounded.
property BOUNDED : Bool;


# @category Geometry
# Number of [[POINTS]].
property N_POINTS = override N_VECTORS;


# @category Geometry
# True if the [[POINTS]] are in convex position.
property CONVEX : Bool;

# @category Geometry
# [[POINTS]] that are not [[Polytope::VERTICES]] of the [[CONVEX_HULL]]
property NON_VERTICES : Set;

# @category Geometry
# Indices of [[Polytope::VERTICES]] of the [[CONVEX_HULL]] as [[POINTS]]
property VERTEX_POINT_MAP : Array<Int>;


# @category Geometry
# Dual basis of the affine hull of the point configuration
property AFFINE_HULL : Matrix<Scalar>;

# @category Combinatorics
# Graph of the point configuration.
# Two points are adjacent if they are neigbours in a edge of the [[CONVEX_HULL]].
property GRAPH : Graph;


# @category Geometry
# Indices of [[POINTS]] that are rays.
property FAR_POINTS : Set;

# @category Geometry
# The center of gravity of the point configuration.
property BARYCENTER : Vector<Scalar>;

# @category Geometry
# True if (1, 0, 0, ...) is in the relative interior.
property CENTERED : Bool;


# @category Triangulation and volume
# Some triangulation of the point configuration.
property TRIANGULATION : topaz::GeometricSimplicialComplex<Scalar> : multiple {

   # @category Triangulation and volume
   # The splits that are coarsenings of the current [[TRIANGULATION]].
   # If the triangulation is regular these form the unique split decomposition of
   # the corresponding weight function.
   property REFINED_SPLITS : Set<Int>;
   
   # @category Triangulation and volume
   # GKZ-vector
   # 	See Chapter 7 in Gelfand, Kapranov, and Zelevinsky:
   # 	Discriminants, Resultants and Multidimensional Determinants, Birkhäuser 1994
   property GKZ_VECTOR : Vector<Scalar>;

   # @category Triangulation and volume
   # Checks regularity of [[TRIANGULATION]].
   property REGULAR : Bool;

   # @category Triangulation and volume
   # Weight vector to construct a regular [[TRIANGULATION]].
   # Must be generic.
   property WEIGHTS : Vector<Scalar>;
   
   # @category Triangulation and volume
   # Calculate the massive GKZ vectors of the triangulations of a integral PointConfiguration //A//.
   # For a definition see Chapter 11 of Gelfand, Kapranov, and Zelevinsky: Discriminants, Resultants and Multidimensional Determinants, Birkhäuser 1994.
   # @param PointConfiguration<Rational> A the integral point configuration
   # @return Vector<Integer>
   # @example To calculate the massive GKZ vector of a triangulation of a point configuration.
   # This example is from the book mentioned above (p. 369, top right example).
   # > $A=new PointConfiguration(POINTS=>[[1,0,0],[1,1,0],[1,2,0],[1,3,0],[1,0,1],[1,1,1],[1,0,2]]);
   # > $A->add("TRIANGULATION", WEIGHTS=>[0,1,0,1,1,1,0]);
   # > print $A->TRIANGULATION->MASSIVE_GKZ_VECTOR;
   # | 1 0 3 1 0 0 4
   property MASSIVE_GKZ_VECTOR : Vector<Scalar>;

}

# @category Triangulation and volume
# boundary complex of the triangulation
property TRIANGULATION.BOUNDARY {

   # @category Triangulation and volume
   # DOC_FIXME: Incomprehensible description!
   # For each facet the set of simplex indices of BOUNDARY that triangulate it.
   property FACET_TRIANGULATIONS : Array<Set>;
}


# @category Combinatorics
# The splits of the point configuration, i.e., hyperplanes cutting the configuration in
# two parts such that we have a regular subdivision.
property SPLITS : Matrix<Scalar>;

# @category Combinatorics
# Two [[SPLITS]] are compatible if the defining hyperplanes do not intersect in the
# interior of the point configuration.  This defines a graph.
property SPLIT_COMPATIBILITY_GRAPH : Graph;


# @category Visualization
# [[Polytope::VIF_CYCLIC_NORMAL]] of the [[CONVEX_HULL]], but with
# the indices form [[POINTS]] instead of [[Polytope::VERTICES]]
property PIF_CYCLIC_NORMAL : Array<Array<Int>>;

}

# Local Variables:
# mode: perl
# c-basic-offset:4
# End: