File: polyhedral_complex_properties.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 (123 lines) | stat: -rw-r--r-- 3,517 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
#  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.
#-------------------------------------------------------------------------------

object PolyhedralComplex {

file_suffix pcom

# overrides of derived [[PolyhedralFan]] properties;
# similar to overrides for [[Polytope]] objects derived from [[Cone]]

# @category Input property
property POINTS = override INPUT_RAYS;

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

# @category Visualization
property POINT_LABELS = override INPUT_RAY_LABELS;

# @category Geometry
property VERTICES = override RAYS;

# @category Geometry
# Number of [[VERTICES]].
property N_VERTICES = override N_RAYS;

# @category Visualization
property VERTEX_LABELS = override RAY_LABELS;

# @category Geometry
property AFFINE_HULL = override LINEAR_SPAN_NORMALS;

# @category Input property
property INPUT_POLYTOPES = override INPUT_CONES;

# @category Combinatorics
property MAXIMAL_POLYTOPES = override MAXIMAL_CONES;

# @category Combinatorics
property MAXIMAL_POLYTOPES_THRU_VERTICES = override MAXIMAL_CONES_THRU_RAYS;

# @category Combinatorics
# Number of [[MAXIMAL_POLYTOPES]].
property N_MAXIMAL_POLYTOPES = override N_MAXIMAL_CONES;

# @category Combinatorics
# Array of incidence matrices of all [[MAXIMAL_POLYTOPES|maximal polytopes]].
property MAXIMAL_POLYTOPES_INCIDENCES = override MAXIMAL_CONES_INCIDENCES;

# @category Combinatorics
property MAXIMAL_POLYTOPES_COMBINATORIAL_DIMS = override MAXIMAL_CONES_COMBINATORIAL_DIMS;

# @category Geometry
property MAXIMAL_POLYTOPES_AFFINE_HULL_NORMALS = override MAXIMAL_CONES_LINEAR_SPAN_NORMALS;

# @category Geometry
property MAXIMAL_POLYTOPES_FACETS = override MAXIMAL_CONES_FACETS;

# @category Combinatorics
property POLYTOPES = override CONES;

# @category Combinatorics
property N_POLYTOPES = override N_CONES;

# @category Geometry
# True if each object in [[MAXIMAL_POLYTOPES]] is [[Polytope::BOUNDED|bounded]].
property BOUNDED : Bool;

# @category Geometry
# Indices of vertices that are rays.

property FAR_VERTICES : Set;


# @category Geometry
# Returns the //i//-th facet of the complex as a [[Polytope]].
# @param Int i 
# @return Polytope
# warning: might be unbounded
user_method polytope($) : MAXIMAL_POLYTOPES {
   my $p=new Polytope<Scalar>($_[0]->cone($_[1]));
   return $p;
}

# @category Geometry
# Returns the dimension of the ambient space.
# @return Int
user_method AMBIENT_DIM {
  my ($self)=@_;
  return $self->FAN_AMBIENT_DIM-1;
}

# @category Geometry
# Returns the dimension of the linear space spanned by the complex.
# @return Int
user_method DIM {
  my ($self)=@_;
  if (!defined ($self->lookup("LINEALITY_SPACE | INPUT_LINEALITY | INPUT_RAYS | RAYS | FACET_NORMALS | LINEAR_SPAN_NORMALS"))) {
    return $self->COMBINATORIAL_DIM;
  }
  return $self->FAN_DIM-1;
}

}

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