Aim: A helper class to build polytopes from digital sets and to check digital k-convexity and full convexity.
More...
#include <DGtal/geometry/volumes/DigitalConvexity.h>
|
|
| ~DigitalConvexity ()=default |
|
| DigitalConvexity ()=default |
|
| DigitalConvexity (const Self &other)=default |
|
| DigitalConvexity (Clone< KSpace > K, bool safe=false) |
|
| DigitalConvexity (Point lo, Point hi, bool safe=false) |
|
Self & | operator= (const Self &other)=default |
|
const KSpace & | space () const |
|
|
template<typename PointIterator > |
CellGeometry | makeCellCover (PointIterator itB, PointIterator itE, Dimension i=0, Dimension k=KSpace::dimension) const |
|
CellGeometry | makeCellCover (const LatticePolytope &P, Dimension i=0, Dimension k=KSpace::dimension) const |
|
CellGeometry | makeCellCover (const RationalPolytope &P, Dimension i=0, Dimension k=KSpace::dimension) const |
|
|
LatticePolytope | makePolytope (const PointRange &X, bool make_minkowski_summable=false) const |
|
PointRange | U (Dimension i, const PointRange &X) const |
|
bool | is0Convex (const PointRange &X) const |
|
bool | isFullyConvex (const PointRange &X, bool convex0=false) const |
|
bool | isFullyConvexFast (const PointRange &X) const |
|
bool | isFullySubconvex (const PointRange &Y, const LatticeSet &StarX) const |
|
bool | isKSubconvex (const Point &a, const Point &b, const CellGeometry &C, const Dimension k) const |
|
bool | isFullySubconvex (const Point &a, const Point &b, const CellGeometry &C) const |
|
bool | isFullySubconvex (const Point &a, const Point &b, const LatticeSet &StarX) const |
|
LatticePolytope | CvxH (const PointRange &X) const |
|
PointRange | ExtrCvxH (const PointRange &X) const |
|
LatticeSet | StarCvxH (const PointRange &X, Dimension axis=dimension) const |
|
Integer | sizeStarCvxH (const PointRange &X) const |
|
LatticeSet | Star (const PointRange &X, Dimension axis=dimension) const |
|
LatticeSet | StarCells (const PointRange &C, Dimension axis=dimension) const |
|
PointRange | Extr (const PointRange &C) const |
|
PointRange | Extr (const LatticeSet &C) const |
|
LatticeSet | Skel (const LatticeSet &C) const |
|
PointRange | ExtrSkel (const LatticeSet &C) const |
|
LatticeSet | toLatticeSet (const PointRange &X, Dimension axis=dimension) const |
|
PointRange | toPointRange (const LatticeSet &L) const |
|
|
bool | isKConvex (const LatticePolytope &P, const Dimension k) const |
|
bool | isFullyConvex (const LatticePolytope &P) const |
|
bool | isKSubconvex (const LatticePolytope &P, const CellGeometry &C, const Dimension k) const |
|
bool | isFullySubconvex (const LatticePolytope &P, const CellGeometry &C) const |
|
bool | isFullySubconvex (const LatticePolytope &P, const LatticeSet &StarX) const |
|
|
bool | isKConvex (const RationalPolytope &P, const Dimension k) const |
|
bool | isFullyConvex (const RationalPolytope &P) const |
|
bool | isKSubconvex (const RationalPolytope &P, const CellGeometry &C, const Dimension k) const |
|
bool | isFullySubconvex (const RationalPolytope &P, const CellGeometry &C) const |
|
|
void | selfDisplay (std::ostream &out) const |
|
bool | isValid () const |
|
|
enum class | SimplexType { INVALID
, DEGENERATED
, UNITARY
, COMMON
} |
| The possible types for simplices. More...
|
|
template<typename PointIterator > |
static LatticePolytope | makeSimplex (PointIterator itB, PointIterator itE) |
|
static LatticePolytope | makeSimplex (std::initializer_list< Point > l) |
|
template<typename PointIterator > |
static RationalPolytope | makeRationalSimplex (Integer d, PointIterator itB, PointIterator itE) |
|
static RationalPolytope | makeRationalSimplex (std::initializer_list< Point > l) |
|
template<typename PointIterator > |
static bool | isSimplexFullDimensional (PointIterator itB, PointIterator itE) |
|
static bool | isSimplexFullDimensional (std::initializer_list< Point > l) |
|
template<typename PointIterator > |
static SimplexType | simplexType (PointIterator itB, PointIterator itE) |
|
static SimplexType | simplexType (std::initializer_list< Point > l) |
|
template<typename PointIterator > |
static void | displaySimplex (std::ostream &out, PointIterator itB, PointIterator itE) |
|
static void | displaySimplex (std::ostream &out, std::initializer_list< Point > l) |
|
template<typename TKSpace>
class DGtal::DigitalConvexity< TKSpace >
Aim: A helper class to build polytopes from digital sets and to check digital k-convexity and full convexity.
Description of template class 'DigitalConvexity'
- See also
- moduleDigitalConvexity
It is a model of boost::CopyConstructible, boost::DefaultConstructible, boost::Assignable.
- Template Parameters
-
TKSpace | an arbitrary model of CCellularGridSpaceND. |
- Examples
- geometry/curves/exampleDigitalConvexity.cpp, geometry/curves/exampleRationalConvexity.cpp, geometry/volumes/checkFullConvexityTheorems.cpp, geometry/volumes/digitalPolyhedronBuilder3D.cpp, and geometry/volumes/standardDigitalPolyhedronBuilder3D.cpp.
Definition at line 77 of file DigitalConvexity.h.
◆ Cell
template<typename TKSpace >
◆ CellGeometry
template<typename TKSpace >
◆ Counter
template<typename TKSpace >
◆ Integer
template<typename TKSpace >
◆ Interval
template<typename TKSpace >
◆ KSpace
template<typename TKSpace >
◆ LatticePolytope
template<typename TKSpace >
◆ LatticeSet
template<typename TKSpace >
◆ Point
template<typename TKSpace >
◆ PointRange
template<typename TKSpace >
◆ PointSet
template<typename TKSpace >
◆ Polytope
template<typename TKSpace >
◆ RationalPolytope
template<typename TKSpace >
◆ Self
template<typename TKSpace >
◆ Size
template<typename TKSpace >
◆ Space
template<typename TKSpace >
◆ Vector
template<typename TKSpace >
◆ EnvelopeAlgorithm
template<typename TKSpace >
Choice of algorithm for computing the fully convex envelope of a digital set.
Enumerator |
---|
DIRECT | Slightly faster but quite ugly big function
|
LATTICE_SET | Slightly slower function but decomposes well the algorithm
|
Definition at line 642 of file DigitalConvexity.h.
◆ SimplexType
template<typename TKSpace >
The possible types for simplices.
Enumerator |
---|
INVALID | When there are not the right number of vertices.
|
DEGENERATED | When the points of the simplex are not in general position.
|
UNITARY | When its edges form a unit parallelotope (det = +/- 1)
|
COMMON | Common simplex.
|
Definition at line 237 of file DigitalConvexity.h.
237 {
242 };
@ UNITARY
When its edges form a unit parallelotope (det = +/- 1)
@ INVALID
When there are not the right number of vertices.
@ DEGENERATED
When the points of the simplex are not in general position.
◆ ~DigitalConvexity()
template<typename TKSpace >
◆ DigitalConvexity() [1/4]
template<typename TKSpace >
◆ DigitalConvexity() [2/4]
template<typename TKSpace >
Copy constructor.
- Parameters
-
other | the object to clone. |
◆ DigitalConvexity() [3/4]
template<typename TKSpace >
Constructor from cellular space.
- Parameters
-
K | any cellular grid space. |
safe | when 'true' performs convex hull computations with arbitrary precision integer (if available), otherwise chooses a compromise between speed and precision (int64_t). |
◆ DigitalConvexity() [4/4]
template<typename TKSpace >
Constructor from lower and upper points.
- Parameters
-
lo | the lowest point of the domain (bounding box for computations). |
hi | the highest point of the domain (bounding box for computations). |
safe | when 'true' performs convex hull computations with arbitrary precision integer (if available), otherwise chooses a compromise between speed and precision (int64_t). |
◆ BOOST_CONCEPT_ASSERT()
template<typename TKSpace >
◆ CvxH()
template<typename TKSpace >
Given a range of distinct points X, computes the tightiest polytope that enclosed it. Note that this polytope may contain more lattice points than the given input points.
- Parameters
-
X | any range of pairwise distinct points |
- Returns
- the corresponding lattice polytope.
- Note
- alias for DigitalConvexity::makePolytope
Definition at line 504 of file DigitalConvexity.h.
505 {
507 }
LatticePolytope makePolytope(const PointRange &X, bool make_minkowski_summable=false) const
References DGtal::DigitalConvexity< TKSpace >::makePolytope().
◆ depthLastEnvelope()
template<typename TKSpace >
◆ displaySimplex() [1/2]
template<typename TKSpace >
template<typename PointIterator >
static void DGtal::DigitalConvexity< TKSpace >::displaySimplex |
( |
std::ostream & |
out, |
|
|
PointIterator |
itB, |
|
|
PointIterator |
itE |
|
) |
| |
|
static |
Displays information about the simplex formed by the given range [itB,itE) of lattice points.
- Template Parameters
-
PointIterator | any model of forward iterator on Point. |
- Parameters
-
[in,out] | out | the output stream where information is outputed. |
| itB | the start of the range of n+1 points defining the simplex. |
| itE | past the end the range of n+1 points defining the simplex. |
◆ displaySimplex() [2/2]
template<typename TKSpace >
Displays information about simplex formed by the given list l of lattice points.
- Parameters
-
[in,out] | out | the output stream where information is outputed. |
| l | any list of lattice points. |
◆ envelope()
template<typename TKSpace >
◆ eraseInterval()
template<typename TKSpace >
Erase the interval I from the intervals in V such that the integer in I are not part of V anymore.
- Parameters
-
[in] | I | is a closed interval |
[in,out] | V | is a sorted list of closed intervals |
◆ Extr() [1/2]
template<typename TKSpace >
- Parameters
-
C | a range of cells represented as a lattice set. |
- Returns
- the range of digital points that are the extremal vertices to the cells in C.
◆ Extr() [2/2]
template<typename TKSpace >
- Parameters
-
C | a range of cells represented with points in Khalimsky coordinates. |
- Returns
- the range of digital points that are the extremal vertices to the cells in C.
◆ ExtrCvxH()
template<typename TKSpace >
Given a range of distinct points X, computes the vertices of the tightiest polytope that enclosed it.
- Parameters
-
X | any range of pairwise distinct points |
- Returns
- the vertices or extrema of
CvxH(X)
.
- Note
- The method works in nD for full dimensional convex hulls. It can handle not full dimensional convex hull up to dimension 3 included.
◆ ExtrSkel()
template<typename TKSpace >
- Parameters
-
C | a range of cells represented as a lattice set. |
- Returns
- the range of digital points that are the extremal vertices to the skeleton of the cells in C.
◆ FC()
template<typename TKSpace >
Computes FC(Z):=Extr(Skel(Star(CvxH(Z))))
, for Z a range of points
- Parameters
-
Z | any range of points (must be sorted). |
algo | the chosen method of computation. |
- Returns
- FC( Z )
◆ FC_direct()
template<typename TKSpace >
Computes FC(Z):=Extr(Skel(Star(CvxH(Z))))
, for Z a range of points
- Parameters
-
Z | any range of points (must be sorted). |
- Returns
- FC( Z )
◆ FC_LatticeSet()
template<typename TKSpace >
Computes FC(Z):=Extr(Skel(Star(CvxH(Z))))
, for Z a range of points
- Parameters
-
Z | any range of points (must be sorted). |
- Returns
- FC( Z )
◆ filter()
template<typename TKSpace >
template<typename Predicate >
Filters the points of E and outputs only the ones that satisfies the given predicate Pred.
- Template Parameters
-
Predicate | the type of a predicate Point -> boolean |
- Parameters
-
[in] | E | any range of point |
[in] | Pred | the predicate Point -> boolean |
- Returns
- the subset of E whose elements satisfy the predicate Pred.
◆ insidePoints() [1/2]
template<typename TKSpace >
- Parameters
-
polytope | any lattice polytope. |
- Returns
- the range of digital points that belongs to the polytope.
Referenced by SCENARIO().
◆ insidePoints() [2/2]
template<typename TKSpace >
- Parameters
-
polytope | any rational polytope. |
- Returns
- the range of digital points that belongs to the polytope.
◆ interiorPoints() [1/2]
template<typename TKSpace >
- Parameters
-
polytope | any lattice polytope. |
- Returns
- the range of digital points that belongs to the interior of the polytope.
◆ interiorPoints() [2/2]
template<typename TKSpace >
- Parameters
-
polytope | any rational polytope. |
- Returns
- the range of digital points that belongs to the interior of the polytope.
◆ is0Convex()
template<typename TKSpace >
◆ isFullyConvex() [1/3]
template<typename TKSpace >
Tells if a given polytope P is fully digitally convex. The digital 0-convexity is the usual property \( Conv( P \cap Z^d
) = P \cap Z^d) \). Otherwise the property asks that the points inside P touch as many k-cells that the convex hull of P, for any valid dimension k.
- Parameters
-
P | any lattice polytope such that P.canBeSummed() == true . |
- Returns
- 'true' iff the polytope P is fully digitally convex.
- Note
- A polytope is always digitally 0-convex. Furthermore, if it is not digitally d-1-convex then it is digitally d-convex (d := KSpace::dimension). Hence, we only check k-convexity for 1 <= k <= d-1.
◆ isFullyConvex() [2/3]
template<typename TKSpace >
◆ isFullyConvex() [3/3]
template<typename TKSpace >
Tells if a given polytope P is fully digitally convex. The digital 0-convexity is the usual property \( Conv( P \cap Z^d
) = P \cap Z^d) \). Otherwise the property asks that the points inside P touch as many k-cells that the convex hull of P, for any valid dimension k.
- Parameters
-
P | any rational polytope such that P.canBeSummed() == true . |
- Returns
- 'true' iff the polytope P is fully digitally convex.
- Note
- A polytope is always digitally 0-convex. Furthermore, if it is not digitally d-1-convex then it is digitally d-convex (d := KSpace::dimension). Hence, we only check k-convexity for 1 <= k <= d-1.
◆ isFullyConvexFast()
template<typename TKSpace >
Tells if a given point range X is fully digitally convex. The test uses the morphological characterization of full convexity and a fast way to compute lattice points within a polytope. It works for arbitrary set of points in arbitrary dimenion.
- Parameters
-
X | any range of pairwise distinct points |
- Returns
- 'true' iff X is fully digitally convex.
- Note
- This method is generally faster than DigitalConvexity::isFullyConvex if (1) the set is indeed is fully convex, (2) the dimension is high (>= 3 or 4).
Referenced by SCENARIO().
◆ isFullySubconvex() [1/6]
template<typename TKSpace >
Tells if a given polytope P is digitally fully subconvex to some cell cover C. The digital 0-subconvexity is the usual property \( Conv( P \cap Z^d ) \subset C \cap Z^d)
\). Otherwise the property asks that the k-cells intersected by the convex hull of P is a subset of the k-cells of C.
- Parameters
-
P | any lattice polytope such that P.canBeSummed() == true . |
C | any cell cover geometry (i.e. a cubical complex). |
- Returns
- 'true' iff the polytope P is digitally fully subconvex to C.
- Note
- This method only checks the k-subconvexity for valid dimensions stored in C.
◆ isFullySubconvex() [2/6]
template<typename TKSpace >
Tells if a given polytope P is digitally fully subconvex to some lattice set Star_X, i.e. the cell cover of some set X represented by lattice points.
- Parameters
-
P | any lattice polytope such that P.canBeSummed() == true . |
StarX | any lattice set representing an open cubical complex. |
- Returns
- 'true' iff Y is digitally fully subconvex to X.
◆ isFullySubconvex() [3/6]
template<typename TKSpace >
Tells if a given segment from a to b is digitally fully subconvex (i.e. tangent) to some cell cover C. The digital 0-subconvexity is the usual property \( Conv( P \cap Z^d )
\subset C \cap Z^d) \). Otherwise the property asks that the k-cells intersected by the convex hull of the segment is a subset of the k-cells of C.
- Parameters
-
a | any point |
b | any point |
C | any cell cover geometry (i.e. a cubical complex). |
- Returns
- 'true' iff the segment is a digitally fully subconvex of C, i.e. the two points are cotangent.
- Note
- Three times faster than building a (degenerated) lattice polytope and then checking if it subconvex.
◆ isFullySubconvex() [4/6]
template<typename TKSpace >
Tells if a given segment from a to b is digitally fully subconvex (i.e. tangent) to some open complex StarX.
- Parameters
-
a | any point |
b | any point |
StarX | any lattice set representing an open cubical complex. |
- Returns
- 'true' iff the segment is a digitally fully subconvex of C, i.e. the two points are cotangent.
- Note
- Three times faster than building a (degenerated) lattice polytope and then checking if it subconvex.
◆ isFullySubconvex() [5/6]
template<typename TKSpace >
Tells if a given set of points Y is digitally fully subconvex to some lattice set Star_X, i.e. the cell cover of some set X represented by lattice points.
- Parameters
-
Y | any set of points |
StarX | any lattice set representing an open cubical complex. |
- Returns
- 'true' iff Y is digitally fully subconvex to X.
- Note
- This method is slower than the two others, since it builds the polytope embracing Y. However it is much more generic since the two other methods require a Minkowski summable polytope, i.e.
P.canBeSummed() == true
.
Referenced by main(), and SCENARIO().
◆ isFullySubconvex() [6/6]
template<typename TKSpace >
Tells if a given polytope P is digitally fully subconvex to some cell cover C. The digital 0-subconvexity is the usual property \( Conv( P \cap Z^d ) \subset C \cap Z^d)
\). Otherwise the property asks that the k-cells intersected by the convex hull of P is a subset of the k-cells of C.
- Parameters
-
P | any rational polytope such that P.canBeSummed() == true . |
C | any cell cover geometry (i.e. a cubical complex). |
- Returns
- 'true' iff the polytope P is digitally fully subconvex to C.
- Note
- This method only checks the k-subconvexity for valid dimensions stored in C.
◆ isKConvex() [1/2]
template<typename TKSpace >
Tells if a given polytope P is digitally k-convex. The digital 0-convexity is the usual property \( Conv( P \cap Z^d ) = P
\cap Z^d) \). Otherwise the property asks that the points inside P touch as many k-cells that the convex hull of P.
- Parameters
-
P | any lattice polytope such that P.canBeSummed() == true . |
k | the dimension for which the digital k-convexity is checked, 0 <= k <= KSpace::dimension. |
- Returns
- 'true' iff the polytope P is digitally k-convex.
- Note
- A polytope is always digitally 0-convex. Furthermore, if it is not digitally d-1-convex then it is digitally not d-convex (d := KSpace::dimension).
Referenced by SCENARIO().
◆ isKConvex() [2/2]
template<typename TKSpace >
Tells if a given polytope P is digitally k-convex. The digital 0-convexity is the usual property \( Conv( P \cap Z^d ) = P
\cap Z^d) \). Otherwise the property asks that the points inside P touch as many k-cells that the convex hull of P.
- Parameters
-
P | any rational polytope such that P.canBeSummed() == true . |
k | the dimension for which the digital k-convexity is checked, 0 <= k <= KSpace::dimension. |
- Returns
- 'true' iff the polytope P is digitally k-convex.
- Note
- A polytope is always digitally 0-convex. Furthermore, if it is not digitally d-1-convex then it is digitally not d-convex (d := KSpace::dimension).
◆ isKSubconvex() [1/3]
template<typename TKSpace >
Tells if a given polytope P is digitally k-subconvex of some cell cover C. The digital 0-subconvexity is the usual property \( Conv( P \cap Z^d ) \subset C \cap Z^d)
\). Otherwise the property asks that the k-cells intersected by the convex hull of P is a subset of the k-cells of C.
- Parameters
-
P | any lattice polytope such that P.canBeSummed() == true . |
C | any cell cover geometry (i.e. a cubical complex). |
k | the dimension for which the digital k-convexity is checked, 0 <= k <= KSpace::dimension. |
- Returns
- 'true' iff the polytope P is a digitally k-subconvex of C.
◆ isKSubconvex() [2/3]
template<typename TKSpace >
Tells if a given segment from a to b is digitally k-subconvex (i.e. k-tangent) to some cell cover C. The digital 0-subconvexity is the usual property \( Conv( P \cap
Z^d ) \subset C \cap Z^d) \). Otherwise the property asks that the k-cells intersected by the convex hull of the segment is a subset of the k-cells of C.
- Parameters
-
a | any point |
b | any point |
C | any cell cover geometry (i.e. a cubical complex). |
k | the dimension for which the digital k-convexity is checked, 0 <= k <= KSpace::dimension. |
- Returns
- 'true' iff the segment is a digitally k-subconvex of C, i.e. the two points are k-cotangent.
- Note
- Three times faster than building a (degenerated) lattice polytope and then checking if it subconvex.
◆ isKSubconvex() [3/3]
template<typename TKSpace >
Tells if a given polytope P is digitally k-subconvex of some cell cover C. The digital 0-subconvexity is the usual property \( Conv( P \cap Z^d ) \subset C \cap Z^d)
\). Otherwise the property asks that the k-cells intersected by the convex hull of P is a subset of the k-cells of C.
- Parameters
-
P | any rational polytope such that P.canBeSummed() == true . |
C | any cell cover geometry (i.e. a cubical complex). |
k | the dimension for which the digital k-convexity is checked, 0 <= k <= KSpace::dimension. |
- Returns
- 'true' iff the polytope P is a digitally k-subconvex of C.
◆ isSimplexFullDimensional() [1/2]
template<typename TKSpace >
template<typename PointIterator >
Checks if the given range [itB,itE) of lattice points form a full dimensional simplex, i.e. it must contain Space::dimension+1 points in general position.
- Template Parameters
-
PointIterator | any model of forward iterator on Point. |
- Parameters
-
itB | the start of the range of n+1 points defining the simplex. |
itE | past the end the range of n+1 points defining the simplex. |
Referenced by main(), and SCENARIO().
◆ isSimplexFullDimensional() [2/2]
template<typename TKSpace >
Checks if the given list of lattice points l form a full dimensional simplex, i.e. it must contain Space::dimension+1 points in general position.
- Parameters
-
l | any list of d+1 points in general positions. |
◆ isValid()
template<typename TKSpace >
Checks the validity/consistency of the object. If the polytope has been default constructed, it is invalid.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ makeCellCover() [1/3]
template<typename TKSpace >
Builds the cell geometry containing all the j-cells touching the lattice polytope P, for i <= j <= k. It conbains thus all the j-cells intersecting the convex hull of P.
- Parameters
-
P | any lattice polytope such that P.canBeSummed() == true . |
i | the first dimension for which the cell cover is computed. |
k | the last dimension for which the cell cover is computed. |
◆ makeCellCover() [2/3]
template<typename TKSpace >
Builds the cell geometry containing all the j-cells touching the rational polytope P, for i <= j <= k. It conbains thus all the j-cells intersecting the convex hull of P.
- Parameters
-
P | any rational polytope such that P.canBeSummed() == true . |
i | the first dimension for which the cell cover is computed. |
k | the last dimension for which the cell cover is computed. |
◆ makeCellCover() [3/3]
template<typename TKSpace >
template<typename PointIterator >
Builds the cell geometry containing all the j-cells touching a point of [itB,itE), for i <= j <= k.
- Template Parameters
-
PointIterator | any model of input iterator on Points. |
- Parameters
-
itB | start of a range of arbitrary points. |
itE | past the end of a range of arbitrary points. |
i | the first dimension for which the cell cover is computed. |
k | the last dimension for which the cell cover is computed. |
Referenced by main(), and SCENARIO().
◆ makePolytope()
template<typename TKSpace >
◆ makeRationalSimplex() [1/2]
template<typename TKSpace >
template<typename PointIterator >
Constructs a rational polytope from a rational simplex given as a range [itB,itE) of lattice points. Note that the range must contain Space::dimension+1 points or less in general position.
- Template Parameters
-
PointIterator | any model of forward iterator on Point. |
- Parameters
-
d | the common denominator of all given lattice point coordinates. |
itB | the start of the range of no more than n+1 points defining the simplex. |
itE | past the end the range of no more than n+1 points defining the simplex. |
- Note
- If your range is
[itB,itE) = { (3,2), (1,7), (6,6) }
and the denominator d = 4
, then your polytope has vertices { (3/4,2/4), (1/4,7/4), (6/4,6/4) }
.
Referenced by SCENARIO().
◆ makeRationalSimplex() [2/2]
template<typename TKSpace >
Constructs a rational polytope from a simplex given as an initializer_list.
- Parameters
-
l | any list where the first point give the denominator and then no more than d+1 points in general positions. |
- Note
- If your list is
l = { (4,x), (3,2), (1,7), (6,6) }
, then the denominator is d = 4
and your polytope has vertices { (3/4,2/4), (1/4,7/4), (6/4,6/4) }
.
◆ makeSimplex() [1/2]
template<typename TKSpace >
template<typename PointIterator >
Constructs a lattice polytope from a simplex given as a range [itB,itE) of lattice points. Note that the range must contain Space::dimension+1 points or less in general position.
- Template Parameters
-
PointIterator | any model of forward iterator on Point. |
- Parameters
-
itB | the start of the range of no more than n+1 points defining the simplex. |
itE | past the end the range of no more than n+1 points defining the simplex. |
Referenced by main(), and SCENARIO().
◆ makeSimplex() [2/2]
template<typename TKSpace >
Constructs a lattice polytope from a simplex given as an initializer_list.
- Parameters
-
l | any list of no more than d+1 points in general positions. |
- Precondition
- Note that the list must contain no more than Space::dimension+1 points in general position.
◆ operator=()
template<typename TKSpace >
Assignment.
- Parameters
-
- Returns
- a reference on 'this'.
◆ relativeEnvelope() [1/2]
template<typename TKSpace >
Computes the fully convex envelope of Z relative to fully convex digital set Y, i.e. \( FC^*_Y(Z):=FC_Y(FC_Y( \ldots
FC_Y(Z) \ldots )) \) for Z a range of points, until stabilization of the iterative process.
- Parameters
-
Z | any range of points (must be sorted). |
Y | any range of points (must be sorted) that is fully convex. |
algo | the chosen method of computation. |
- Returns
- \( FC^*_Y( Z ) \)
- Note
- If Z is fully convex, then the output is Z itself. Otherwise, the returned set of points includes Z and is fully convex.
Referenced by main(), and SCENARIO().
◆ relativeEnvelope() [2/2]
template<typename TKSpace >
template<typename Predicate >
Computes the fully convex envelope of Z relative to fully convex digital set Y defined by a corresponding predicate PredY. It computes \( FC^*_Y(Z):=FC_Y(FC_Y( \ldots FC_Y(Z) \ldots
)) \) for Z a range of points, until stabilization of the iterative process.
- Template Parameters
-
Predicate | the type of a predicate Point -> boolean |
- Parameters
-
Z | any range of points (must be sorted). |
PredY | a Point predicate such that PredY(p)==true iff p belongs to Y. |
algo | the chosen method of computation. |
- Returns
- \( FC^*_Y( Z ) \)
- Note
- If Z is fully convex, then the output is Z itself. Otherwise, the returned set of points includes Z and is fully convex.
◆ selfDisplay()
template<typename TKSpace >
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
◆ simplexType() [1/2]
template<typename TKSpace >
template<typename PointIterator >
Returns the type of simplex formed by the given range [itB,itE) of lattice points.
- Template Parameters
-
PointIterator | any model of forward iterator on Point. |
- Parameters
-
itB | the start of the range of n+1 points defining the simplex. |
itE | past the end the range of n+1 points defining the simplex. |
- Returns
- the type of simplex formed by the given range [itB,itE) of lattice points.
Referenced by SCENARIO().
◆ simplexType() [2/2]
template<typename TKSpace >
Returns the type of simplex formed by the given list l of lattice points.
- Parameters
-
l | any list of lattice points. |
- Returns
- the type of simplex formed by the given list of lattice points.
◆ sizeStarCvxH()
template<typename TKSpace >
Computes the number of cells in Star(CvxH(X)) for X a digital set.
- Parameters
-
X | any range of lattice points |
- Returns
- the number of cells touching the convex hull of X, represented as lattice points with Khalimsky coordinates.
◆ Skel()
template<typename TKSpace >
- Parameters
-
C | a range of cells represented as a lattice set. |
- Returns
- the set of cells, represented as a lattice set, that form the skeleton of the given range of cells C.
◆ space()
template<typename TKSpace >
◆ Star()
template<typename TKSpace >
Builds the cell complex Star(X) for X a digital set, represented as a lattice set (stacked row representation).
- Parameters
-
X | any range of lattice points |
axis | specifies the projection axis for the row representation if below space dimension, otherwise chooses the axis that minimizes memory/computations. |
- Returns
- the set of cells, represented as a lattice set, that touches points of X, i.e.
Star(X)
.
- Note
- It is useful to specify an axis if you wish later to compare or make operations with several lattice sets. They must indeed have the same axis.
◆ StarCells()
template<typename TKSpace >
Builds the cell complex Star(C) for C a range of cells, represented as a lattice set (stacked row representation).
- Parameters
-
C | a range of cells represented with points in Khalimsky coordinates. |
axis | specifies the projection axis for the row representation if below space dimension, otherwise chooses the axis that minimizes memory/computations. |
- Returns
- the set of cells, represented as a lattice set, that touches cells of C, i.e.
Star(C)
.
- Note
- It is useful to specify an axis if you wish later to compare or make operations with several lattice sets. They must indeed have the same axis.
◆ StarCvxH()
template<typename TKSpace >
Builds the cell complex Star(CvxH(X)) for X a digital set, represented as a lattice set (stacked row representation).
- Parameters
-
X | any range of lattice points |
axis | specifies the projection axis for the row representation if below space dimension, otherwise chooses the axis that minimizes memory/computations. |
- Returns
- the range of cells touching the convex hull of X, represented as a lattice set (cells are represented with Khalimsky coordinates).
- Note
- It is useful to specify an axis if you wish later to compare or make operations with several lattice sets. They must indeed have the same axis.
Referenced by checkSkelStarCvxHFullConvexity(), and SCENARIO().
◆ toLatticeSet()
template<typename TKSpace >
Builds the lattice set (stacked row representation) associated to the given range of points.
- Parameters
-
X | any range of lattice points |
axis | specifies the projection axis for the row representation if below space dimension, otherwise chooses the axis that minimizes memory/computations. |
- Returns
- the lattice set that represents the exact same points as X
- Note
- It is useful to specify an axis if you wish later to compare or make operations with several lattice sets. They must indeed have the same axis.
◆ toPointRange()
template<typename TKSpace >
Builds the range of lattice points associated to the given lattice set.
- Parameters
-
- Returns
- the point range that represents the exact same points as L
◆ U()
template<typename TKSpace >
Performs the digital Minkowski sum of X along direction i
- Parameters
-
i | any valid dimension |
X | any sorted range of digital points |
- Returns
- the sorted range of digital points X union the translation of X of one along direction i.
Referenced by checkCvxHPlusHypercubeFullConvexity().
◆ dimension
template<typename TKSpace >
◆ myDepthLastFCE
template<typename TKSpace >
The number of iterations of the last FullyConvexEnvelope operation.
Definition at line 880 of file DigitalConvexity.h.
◆ myK
template<typename TKSpace >
◆ mySafe
template<typename TKSpace >
when 'true' performs convex hull computations with arbitrary precision integer (if available), otherwise chooses a compromise between speed and precision (int64_t).
Definition at line 877 of file DigitalConvexity.h.
The documentation for this class was generated from the following file: