&<(PC1::PCOMPLEX, PC2::PCOMPLEX)::boolean &>(PC2::PCOMPLEX, PC1::PCOMPLEX)::boolean PC1 &< PC2 PC2 &> PC1
Test whether PC1 is a proper subcomplex of PC2. PC1 and PC2 must lie in the same ambient space.
&<=(PC1::PCOMPLEX, PC2::PCOMPLEX)::boolean &<=(PC2::PCOMPLEX, PC1::PCOMPLEX)::boolean PC1 &<= PC2 PC2 &>= PC1
Test whether PC1 is a subcomplex of PC2. PC1 and PC2 must lie in the same ambient space.
&<>(PC1::PCOMPLEX, PC2::PCOMPLEX)::boolean PC1 &<> PC2
Test whether PC1 and PC2 describe different polyhedral complexes. This is true if the complexes lie in different ambient spaces.
&=(PC1::PCOMPLEX, PC2::PCOMPLEX)::boolean PC1 &= PC2
Test whether PC1 and PC2 describe the same polyhedral complex. This is false if the complexes lie in different ambient spaces.
&x(PC1::PCOMPLEX, ...)::PCOMPLEX PC1 &x PC2
The Cartesian product of the given polyhedral complexes. See POLYHEDRON[&x].
ambientdim(PC::PCOMPLEX)::nonnegint
The dimension of the ambient space of PC.
codim(PC::PCOMPLEX)::nonnegint
The codimension of F is that of the affine hull of its elements. Note that dim(PC) and codim(PC) do not necessarily add up to ambientdim(PC). See also dim and ambientdim.
contains(PC::PCOMPLEX, P::POLYHEDRON)::boolean contains(PC::PCOMPLEX, P::POLYHEDRON, P2::name)::boolean
Test whether P is contained in the polyhedral complex PC. If there is a third argument P2, it will be assigned the corresponding element of PC (of type CELL) in this case. It is essentially the same as P, but with the added information that it belongs to a polyhedral complex.
convert(PC::PCOMPLEX, FAN)::FAN
Convert PC to the fan corresponding to it under homogenization. See POLYHEDRON[convert/CONE].
delaunay(v1::vec, ...)::PCOMPLEX
The Delaunay decomposition of the convex hull of the given points. All points must lie in the same ambient space; at least one point must be given. Generically, the Delaunay decomposition is a triangulation, i.e., all cells are simplices.
dim(PC::PCOMPLEX)::integer
The dimension of PC is the maximum of the dimensions of the cells in PC.
draw(PC::PCOMPLEX, opt);
Draws the polyhedral complex PC (which must be 2- or 3-dimensional and bounded). In order to see all cells, the plot option style = line can be very useful. See POLYHEDRON[draw].
PC := pcomplex(cube(3), image(cube(3), [2, -2, 2]), image(cube(3), [2, -2, -2])); draw(PC, style = line); |
emptypcomplex(n::integer)::PCOMPLEX
The empty polyhedral complex in n-space.
flagf(PC::PCOMPLEX, S::set(integer))::nonnegint
The flag f-number of PC indexed by S. This is the number of chains of cells in PC of dimensions given by S.
flagh(PC::PCOMPLEX, S::set(integer))::nonnegint
The flag h-number of PC indexed by S. This is the alternating sum over all flagf(PC, T) where T runs over all subsets of S.
fvector(PC::PCOMPLEX)::Array
An Array indexed from -1 to ambientdim(PC) giving the number of cells in each dimension.
PC := boundary(cube(4)); fvector(PC); |
furthestdelaunay(v1::vec, ...)::PCOMPLEX
The furthest-site Delaunay decomposition of the convex hull of the given points.
TBD: more
homology(PC::PCOMPLEX, PC0::PCOMPLEX, rational)::Array homology(PC::PCOMPLEX, PC0::PCOMPLEX, integer)::Array homology(PC::PCOMPLEX, PC0::PCOMPLEX, specfunc(prime, integer))::Array
An Array indexed from 0 to ambientdim(PC) giving the homology (with closed support) of PC relative to the subcomplex PC0. If PC0 is omitted, then absolute homology is computed. Note that if PC is bounded, homology with closed support coincides with ordinary homology. One can choose between rational, integer and prime field coefficients. The default is rational. In the case of field coefficients, each Array entry is of type nonnegint and gives the corresponding Betti number. If integer is specified, each entry is of type MODZ and describes the corresponding Abelian group.
For large polyhedral complexes and integer coefficients, the most time-consuming step is the calculation of the Smith normal formĀ (SNF) of the differentials. By default, this is done by the Maple function LinearAlgebra[SmithForm]. This can be overridden in two ways: If the environment variable _Env_ismith exists and points to a procedure, it is called instead. Otherwise, if the global variable ismith exists and points to a procedure, that is taken. Finally, LinearAlgebra[SmithForm] is called as a last resort. The user provided function, say, smith, must be defined as smith(A::mat)::{matrix, list(posint)}. If it returns a matrix, this must be the SNF of A. If it returns a list(posint), this must be the elementary divisors (i.e., the non-zero diagonal entries of the SNF).
PC := pcomplex(cube(3)); homology(PC, integer); |
homology(PC, boundary(cube(3))); |
P := cube(1) &x fullpolyhedron(2); homology(pcomplex(P), integer(5)); |
hplanes(PC::PCOMPLEX)::list(vec)
This is the same as hplanes(P) where P is the affine hull of PC. See POLYHEDRON[hplanes].
image(PC::PCOMPLEX, A::{mat, rational, real_infinity}, v::vec)::PCOMPLEX
This is similar to preimage. Note that the image of a polyhedral complex is not necessarily a polyhedral complex.
TBD: more
isbounded(PC::PCOMPLEX)::boolean
Test whether PC is bounded. A polyhedral complex is bounded if all its cells are. See POLYHEDRON[isbounded].
iscomplete(PC::PCOMPLEX)::boolean
Test whether PC is complete. A polyhedral complex is complete if its cells fill up the whole ambient space.
isempty(PC::PCOMPLEX)::boolean
Test whether PC is the empty polyhedral complex.
ispointed(PC::PCOMPLEX)::boolean
Test whether PC is pointed. A polyhedral complex is pointed if all its cells are. See POLYHEDRON[ispointed].
issimplicial(PC::PCOMPLEX)::boolean
Test whether PC is simplicial, that is, whether all cells in PC are so (in the sense of POLYHEDRON[issimplicial]). Note that this does not imply that PC is bounded.
lines(PC::PCOMPLEX)::{list(vec), FAIL}
A basis of the lineality space of PC, or FAIL if the cells of PC do not have a common lineality space. See also POLYHEDRON[lines].
P := convhull([0, 0], [1, 2]); PC := normalfan(P); |
lines(PC); |
P1 := convhull([0, 0], line([1, 0])); P2 := convhull([0, 2]); PC := pcomplex(P1, P2); |
lines(PC); |
maximal(PC::PCOMPLEX)::list(CELL) maximal(PC::PCOMPLEX, list)::list(CELL) maximal(PC::PCOMPLEX, array)::array(list(CELL))
The maximal elements of PC, either as list (which is the default) or as array. The elements of the list are ordered by non-increasing dimension. The array is indexed from -1 to the ambient dimension; its n-th entry is a list of the maximal elements of PC of dimension n.
The return type array may change to Array in future versions.
minimal(PC::PCOMPLEX)::list(CELL)
The unique minimal element of PC, which is the empty cell. In order to be symmetric to the function maximal, the result is wrapped up in a list.
pcomplex(arg1::{POLYHEDRON, PCOMPLEX}, ...)::PCOMPLEX
This function creates an object of type PCOMPLEX representing the polyhedral complex generated by all the arguments. The given polyhedra must be compatible, but may be redundant. A polyhedral complex as argument is equivalent to the sequence of its (maximal) cones. See also POLYHEDRON[arecompatible].
plotdata(PC::PCOMPLEX) plotdata(PC::PCOMPLEX, opt)
The arguments for the PLOT or PLOT3D data structure that gives a graphical representation of PC. See POLYHEDRON[plotdata] and draw.
preimage(PC::PCOMPLEX, A::{mat, rational, real_infinity}, v::vec)::PCOMPLEX
The preimage of the polyhedral complex PC under the affine map specified by A and v. See POLYHEDRON[preimage] for more on the possible types of A and v.
rays(PC::PCOMPLEX)::set(vec)
The set of rays of PC. This is the union of the rays of all cells of PC. If PC does not have a well-defined lineality space, then the normalization is somewhat weird. See POLYHEDRON[rays].
PC := facefan(image(cube(2), [1, 1])); rays(PC); |
simplicialsubdiv(PC::PCOMPLEX)::PCOMPLEX
A subdivision of PC in which all cells are simplicial. The simplicial part of PC will not be modified, nor will new vertices or rays be introduced. At present, PC must be pointed.
skeleton(PC::PCOMPLEX, n::integer)::PCOMPLEX
The n-skeleton of PC is the polyhedral subcomplex of all cells of dimension at most n. An error occurs if there are no such cells.
PC := boundary(cube(3)); PC2 := skeleton(PC, 1); draw(PC2); |
skeleton(PC, -1); |
skeleton(PC, -2); |
support(PC::PCOMPLEX, v1::vec, ...)::{CELL, FAIL}
The support of v1, ... in in PC. This is the smallest cell in PC containing all given vectors. If no such cell exists, the function returns FAIL. See also POLYHEDRON[support].
traverse(PC::PCOMPLEX, g::procedure)::set(set(vec))
The call traverse(PC, g) is equivalent to traverse2 (PC, g, proc() end), see traverse2 and FAN[traverse].
TBD: explain return value
traverse2(PC::PCOMPLEX, g2::procedure)::set(set(vec)) traverse2(PC::PCOMPLEX, g1::procedure, g2::procedure)::set(set(vec))
This function is analogous to FAN[traverse2].
TBD: explain return value
vertices(PC::PCOMPLEX)::set(vec)
The set of vertices of PC. This is the union of the vertices of all cells of PC. If PC does not have a well-defined lineality space, then the normalization is somewhat weird. See POLYHEDRON[vertices].
PC := boundary(cube(2)); vertices(PC); |
volume(PC::PCOMPLEX)::{nonnegative, pos_infinity}
The sum of the volumes of the cells of PC. See POLYHEDRON[volume].
voronoi(v1::vec, ...)::PCOMPLEX
The Voronoi decomposition of the ambient space of the given points. This is the complete polyhedral complex containing one full-dimensional cell Pn for each argument vn. The points in the interior of Pn are exactly those which are closer to vn than to any other of the given points. All points must lie in the same ambient space; at least one point must be given. Generically, all cells are simple.