DGtal
1.5.beta
|
Aim: SymmetricConvexExpander computes symmetric fully convex subsets of a given digital set. More...
#include </home/runner/work/DGtal/DGtal/examples/polyscope-examples/SymmetricConvexExpander.h>
Data Structures | |
struct | NodeComparator |
Public Types | |
typedef DigitalConvexity< TKSpace > | Self |
typedef TKSpace | KSpace |
typedef TPointPredicate | PointPredicate |
typedef KSpace::Integer | Integer |
typedef KSpace::Point | Point |
typedef KSpace::Vector | Vector |
typedef KSpace::Space | Space |
typedef std::size_t | Size |
typedef DGtal::BoundedLatticePolytope< Space > | LatticePolytope |
typedef DGtal::BoundedRationalPolytope< Space > | RationalPolytope |
typedef std::vector< Point > | PointRange |
typedef std::vector< Vector > | VectorRange |
typedef std::unordered_set< Point > | PointSet |
typedef std::pair< Point, Integer > | Node |
typedef std::priority_queue< Node, std::vector< Node >, NodeComparator > | NodeQueue |
Public Member Functions | |
SymmetricConvexExpander (const PointPredicate &predicate, const Point &kcenter, const Point &lo, const Point &hi) | |
Constructor from predicate and symmetry center point. More... | |
bool | predicate (const Point &p) const |
void | init (const Point &kcenter) |
bool | advance (bool enforce_full_convexity) |
Advance of one symmetric point. More... | |
const Node & | current () const |
void | ignore () |
void | expand () |
bool | finished () const |
Point | symmetric (const Point &p) const |
PointRange | next (const Point &p) const |
Data Fields | |
const PointPredicate * | myPredicate |
The predicate that every point must satisfy. More... | |
DigitalConvexity< KSpace > | myConvexity |
The digital convexity object. More... | |
Point | myKCenter |
Symmetry center (with doubled coordinates to represent half-integers). More... | |
PointSet | myPoints |
Symmetric range of lattice points, sorted. More... | |
NodeQueue | myQ |
PointSet | myM |
Marked points, i.e. points already in the queue or in the object. More... | |
bool | myPerfectSymmetry |
True iff the set and its local complement are symmetric. More... | |
Integer | myPerfectSymmetryRadius |
Upper bound on the max distance of perfect symmetry. More... | |
Static Public Attributes | |
static const Dimension | dimension = KSpace::dimension |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >)) | |
Aim: SymmetricConvexExpander computes symmetric fully convex subsets of a given digital set.
Description of class 'SymmetricConvexExpander'
TKSpace | an arbitrary model of CCellularGridSpaceND. |
TPointPredicate | an arbitrary model of predicate Point -> bool |
Definition at line 64 of file SymmetricConvexExpander.h.
typedef KSpace::Integer DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::Integer |
Definition at line 72 of file SymmetricConvexExpander.h.
typedef TKSpace DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::KSpace |
Definition at line 70 of file SymmetricConvexExpander.h.
typedef DGtal::BoundedLatticePolytope< Space > DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::LatticePolytope |
Definition at line 77 of file SymmetricConvexExpander.h.
typedef std::pair< Point, Integer > DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::Node |
Definition at line 85 of file SymmetricConvexExpander.h.
typedef std::priority_queue< Node, std::vector<Node>, NodeComparator > DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::NodeQueue |
Definition at line 98 of file SymmetricConvexExpander.h.
typedef KSpace::Point DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::Point |
Definition at line 73 of file SymmetricConvexExpander.h.
typedef TPointPredicate DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::PointPredicate |
Definition at line 71 of file SymmetricConvexExpander.h.
typedef std::vector<Point> DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::PointRange |
Definition at line 79 of file SymmetricConvexExpander.h.
typedef std::unordered_set<Point> DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::PointSet |
Definition at line 81 of file SymmetricConvexExpander.h.
typedef DGtal::BoundedRationalPolytope< Space > DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::RationalPolytope |
Definition at line 78 of file SymmetricConvexExpander.h.
typedef DigitalConvexity<TKSpace> DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::Self |
Definition at line 69 of file SymmetricConvexExpander.h.
typedef std::size_t DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::Size |
Definition at line 76 of file SymmetricConvexExpander.h.
typedef KSpace::Space DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::Space |
Definition at line 75 of file SymmetricConvexExpander.h.
typedef KSpace::Vector DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::Vector |
Definition at line 74 of file SymmetricConvexExpander.h.
typedef std::vector<Vector> DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::VectorRange |
Definition at line 80 of file SymmetricConvexExpander.h.
|
inline |
Constructor from predicate and symmetry center point.
Definition at line 101 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().
|
inline |
Advance of one symmetric point.
Definition at line 173 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::current(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::finished(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::ignore(), DGtal::DigitalConvexity< TKSpace >::isFullyConvex(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myConvexity, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPoints, and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::symmetric().
|
private |
|
inline |
NB: valid only if not 'finished()'.
Definition at line 205 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myQ.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::advance(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand().
|
inline |
Goes to the next vertex and take into account the current vertex for determining the future visited vertices. NB: valid only if not 'finished()'.
Definition at line 227 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::current(), max(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myKCenter, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myM, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPerfectSymmetry, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPerfectSymmetryRadius, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPoints, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myQ, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::next(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::predicate(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::symmetric().
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::advance().
|
inline |
Definition at line 262 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myQ.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::advance().
|
inline |
Goes to the next vertex but ignores the current vertex for determining the future visited vertices. Otherwise said, no future visited vertex will have this vertex as a father.
NB: valid only if not 'finished()'.
Definition at line 217 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myQ.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::advance().
|
inline |
Definition at line 115 of file SymmetricConvexExpander.h.
References DGtal::PointVector< dim, Integer >::base(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::dimension, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myKCenter, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myM, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPerfectSymmetry, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPerfectSymmetryRadius, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPoints, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myQ, DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::predicate(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::size(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::symmetric().
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::SymmetricConvexExpander().
|
inline |
Definition at line 273 of file SymmetricConvexExpander.h.
References DGtal::PointVector< dim, Integer >::base(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::dimension, and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myKCenter.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand().
|
inline |
Definition at line 110 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPredicate.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().
|
inline |
Definition at line 268 of file SymmetricConvexExpander.h.
References DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myKCenter.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::advance(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().
|
static |
Definition at line 83 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::next().
DigitalConvexity< KSpace > DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myConvexity |
The digital convexity object.
Definition at line 289 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::advance().
Point DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myKCenter |
Symmetry center (with doubled coordinates to represent half-integers).
Definition at line 292 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::next(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::symmetric().
PointSet DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myM |
Marked points, i.e. points already in the queue or in the object.
Definition at line 301 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().
bool DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPerfectSymmetry |
True iff the set and its local complement are symmetric.
Definition at line 304 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().
Integer DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPerfectSymmetryRadius |
Upper bound on the max distance of perfect symmetry.
Definition at line 306 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().
PointSet DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPoints |
Symmetric range of lattice points, sorted.
Definition at line 295 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::advance(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().
const PointPredicate* DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myPredicate |
The predicate that every point must satisfy.
Definition at line 286 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::predicate().
NodeQueue DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::myQ |
Queue of points (only one point is inserted in the queue for a symmetric pair of point).
Definition at line 299 of file SymmetricConvexExpander.h.
Referenced by DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::current(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::expand(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::finished(), DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::ignore(), and DGtal::SymmetricConvexExpander< TKSpace, TPointPredicate >::init().