DGtal
1.5.beta
|
Aim: More...
#include <DGtal/kernel/LatticeSetByIntervals.h>
Public Types | |
typedef TSpace | Space |
using | Self = LatticeSetByIntervals< Space > |
using | Point = typename Space::Point |
using | Vector = typename Space::Vector |
using | Integer = typename Space::Integer |
using | PointRange = std::vector< Point > |
using | Intervals = IntegralIntervals< Integer > |
using | Interval = typename Intervals::Interval |
using | Container = std::map< Point, Intervals > |
using | RowIterator = typename Container::iterator |
using | RowConstIterator = typename Container::const_iterator |
using | LatticeSetByInterval = std::map< Point, Interval > |
using | Size = std::size_t |
using | size_type = Size |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >)) | |
Standard services (construction, move, clear) | |
LatticeSetByIntervals (Dimension axis=0) | |
LatticeSetByIntervals (const Self &other)=default | |
LatticeSetByIntervals (Self &&other)=default | |
Self & | operator= (const Self &other)=default |
Self & | operator= (Self &&other)=default |
template<typename PointIterator > | |
LatticeSetByIntervals (PointIterator it, PointIterator itE, Dimension axis=0) | |
LatticeSetByIntervals (const LatticeSetByInterval &aSet, Dimension axis) | |
void | clear () |
Clears the data structure. More... | |
void | setAxis (Dimension axis) |
Dimension | axis () const |
Container & | data () |
conversion services | |
PointRange | toPointRange () const |
capacity services | |
bool | empty () const |
Size | size () const |
Size | max_size () const |
modifier services | |
void | insert (Point p) |
void | erase (Point p) |
void | purge () |
Eliminates rows that contains no element. More... | |
set operations | |
Self & | add (const Self &other) |
Self & | subtract (const Self &other) |
Self | set_union (const Self &other) const |
Self | set_difference (const Self &other) const |
Self | set_intersection (const Self &other) const |
Self | set_symmetric_difference (const Self &other) const |
bool | includes (const Self &other) const |
bool | equals (const Self &other) const |
topology operations | |
Self | starOfPoints () const |
Self | starOfCells () const |
Self | skeletonOfCells () const |
PointRange | extremaOfCells () const |
Static Public Attributes | |
static const Dimension | dimension = Space::dimension |
specific services (interval insertion, removal) | |
Dimension | myAxis |
The axis along which data is stacked in intervals. More... | |
Container | myData |
Associate to each point its sequences of intervals. More... | |
size_type | memory_usage () const noexcept |
Intervals & | at (Point q) |
void | reset (Point p) |
Aim:
Description of template class 'LatticeSetByIntervals'
A class that represents a set of lattice points using intervals along a given axis.
TSpace | any model of concepts::CSpace, for instance any SpaceND like Z2i::Space, Z3i::Space. |
Definition at line 61 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Container = std::map< Point, Intervals > |
Definition at line 74 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Integer = typename Space::Integer |
Definition at line 70 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Interval = typename Intervals::Interval |
Definition at line 73 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Intervals = IntegralIntervals< Integer > |
Definition at line 72 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::LatticeSetByInterval = std::map< Point, Interval > |
Definition at line 77 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Point = typename Space::Point |
Definition at line 68 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::PointRange = std::vector< Point > |
Definition at line 71 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::RowConstIterator = typename Container::const_iterator |
Definition at line 76 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::RowIterator = typename Container::iterator |
Definition at line 75 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Self = LatticeSetByIntervals< Space > |
Definition at line 67 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Size = std::size_t |
Definition at line 78 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::size_type = Size |
Definition at line 79 of file LatticeSetByIntervals.h.
typedef TSpace DGtal::LatticeSetByIntervals< TSpace >::Space |
Definition at line 66 of file LatticeSetByIntervals.h.
using DGtal::LatticeSetByIntervals< TSpace >::Vector = typename Space::Vector |
Definition at line 69 of file LatticeSetByIntervals.h.
|
inline |
Constructor from axis.
axis | the row axis chosen for stacking the points. |
Definition at line 89 of file LatticeSetByIntervals.h.
|
default |
Copy constructor
other | any other object. |
|
default |
Move constructor
other | any other object. |
|
inline |
Constructor from range of points
PointIterator | any model of input iterator on points. |
it,itE | the range of point |
axis | the row axis chosen for stacking the points. |
Definition at line 115 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::axis(), and DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Constructor from lattice set of interval (often a lattice set representation for a polytope, since there is at most one interval per row).
aSet | any lattice set represented by one interval per row. |
axis | the row axis chosen for stacking the points in aSet. |
Definition at line 132 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Performs the union of set other with this object.
other | any intervals |
this->axis() == other.axis()
Definition at line 272 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::axis(), DGtal::Trace::error(), DGtal::LatticeSetByIntervals< TSpace >::myData, and DGtal::trace.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::set_symmetric_difference(), and DGtal::LatticeSetByIntervals< TSpace >::set_union().
|
inline |
q | any point |
Definition at line 642 of file LatticeSetByIntervals.h.
|
inline |
Definition at line 154 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myAxis.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::add(), DGtal::LatticeSetByIntervals< TSpace >::equals(), DGtal::LatticeSetByIntervals< TSpace >::includes(), DGtal::LatticeSetByIntervals< TSpace >::LatticeSetByIntervals(), DGtal::LatticeSetByIntervals< TSpace >::setAxis(), and DGtal::LatticeSetByIntervals< TSpace >::subtract().
DGtal::LatticeSetByIntervals< TSpace >::BOOST_CONCEPT_ASSERT | ( | (concepts::CSpace< TSpace >) | ) |
|
inline |
Clears the data structure.
Definition at line 140 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Definition at line 158 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Definition at line 194 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
other | any other integral set represented by intervals |
Definition at line 398 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::axis(), DGtal::Trace::error(), DGtal::LatticeSetByIntervals< TSpace >::myData, and DGtal::trace.
|
inline |
Erases the point from the set.
p | any point. |
Definition at line 236 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myAxis, and DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Definition at line 550 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::dimension, DGtal::LatticeSetByIntervals< TSpace >::myAxis, and DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
other | any other lattice set represented by intervals |
this->axis() == other.axis()
Definition at line 377 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::axis(), DGtal::Trace::error(), DGtal::LatticeSetByIntervals< TSpace >::myData, and DGtal::trace.
|
inline |
Inserts the point into the set.
p | any point. |
Definition at line 227 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myAxis, and DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Definition at line 213 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inlinenoexcept |
Definition at line 625 of file LatticeSetByIntervals.h.
|
default |
Assignment.
other | any other object. |
|
default |
Move Assignment.
other | any other object. |
|
inline |
Eliminates rows that contains no element.
Definition at line 251 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myData.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::skeletonOfCells().
|
inline |
Reset the intervals for a given point.
p | any point |
Definition at line 653 of file LatticeSetByIntervals.h.
|
inline |
Performs the set difference between this and other.
other | any other integral set represented by intervals |
this->axis() == other.axis()
Definition at line 337 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::subtract().
|
inline |
Performs the set intersection between this and other.
other | any other integral set represented by intervals |
this->axis() == other.axis()
Definition at line 350 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::set_symmetric_difference(), DGtal::LatticeSetByIntervals< TSpace >::set_union(), and DGtal::LatticeSetByIntervals< TSpace >::subtract().
|
inline |
Performs the set symmetric difference between this and other.
other | any other integral set represented by intervals |
this->axis() == other.axis()
Definition at line 363 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::add(), and DGtal::LatticeSetByIntervals< TSpace >::subtract().
Referenced by DGtal::LatticeSetByIntervals< TSpace >::set_intersection().
|
inline |
Performs the set union between this and other.
other | any other integral set represented by intervals |
this->axis() == other.axis()
Definition at line 324 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::add().
Referenced by DGtal::LatticeSetByIntervals< TSpace >::set_intersection().
|
inline |
Change the main axis of projection. If the object is not empty, it empties the object.
axis | any valid integer between 0 and dimension (excluded) |
Definition at line 147 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::axis(), DGtal::LatticeSetByIntervals< TSpace >::myAxis, and DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Definition at line 202 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myData.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::toPointRange().
|
inline |
Consider the set of integers as cells represented by their Khalimsky coordinates, and build their skeleton.
Definition at line 495 of file LatticeSetByIntervals.h.
References DGtal::IntegralIntervals< TInteger >::data(), DGtal::LatticeSetByIntervals< TSpace >::dimension, DGtal::LatticeSetByIntervals< TSpace >::myAxis, DGtal::LatticeSetByIntervals< TSpace >::myData, and DGtal::LatticeSetByIntervals< TSpace >::purge().
|
inline |
Consider the set of integers as cells represented by their Khalimsky coordinates, and build their star.
Definition at line 467 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::dimension, DGtal::LatticeSetByIntervals< TSpace >::myAxis, and DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Consider the set of integers as points, transform them into pointels in Khalimsky coordinates and build their star. Afterwards points represent cells with their Khalimsky coordinates (i.e. even along an axis means closed, odd along an axis means open). Concretely, points coordinates are multiplied by two, and all the incident points are added to this set.
Definition at line 435 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::dimension, DGtal::LatticeSetByIntervals< TSpace >::myAxis, and DGtal::LatticeSetByIntervals< TSpace >::myData.
|
inline |
Subtract set other from this object.
other | any intervals |
this->axis() == other.axis()
Definition at line 299 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::axis(), DGtal::Trace::error(), DGtal::LatticeSetByIntervals< TSpace >::myData, and DGtal::trace.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::set_difference(), DGtal::LatticeSetByIntervals< TSpace >::set_intersection(), and DGtal::LatticeSetByIntervals< TSpace >::set_symmetric_difference().
|
inline |
Definition at line 168 of file LatticeSetByIntervals.h.
References DGtal::LatticeSetByIntervals< TSpace >::myAxis, DGtal::LatticeSetByIntervals< TSpace >::myData, and DGtal::LatticeSetByIntervals< TSpace >::size().
|
static |
Definition at line 80 of file LatticeSetByIntervals.h.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::extremaOfCells(), DGtal::LatticeSetByIntervals< TSpace >::skeletonOfCells(), DGtal::LatticeSetByIntervals< TSpace >::starOfCells(), and DGtal::LatticeSetByIntervals< TSpace >::starOfPoints().
Dimension DGtal::LatticeSetByIntervals< TSpace >::myAxis |
The axis along which data is stacked in intervals.
Definition at line 662 of file LatticeSetByIntervals.h.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::axis(), DGtal::LatticeSetByIntervals< TSpace >::erase(), DGtal::LatticeSetByIntervals< TSpace >::extremaOfCells(), DGtal::LatticeSetByIntervals< TSpace >::insert(), DGtal::LatticeSetByIntervals< TSpace >::setAxis(), DGtal::LatticeSetByIntervals< TSpace >::skeletonOfCells(), DGtal::LatticeSetByIntervals< TSpace >::starOfCells(), DGtal::LatticeSetByIntervals< TSpace >::starOfPoints(), and DGtal::LatticeSetByIntervals< TSpace >::toPointRange().
Container DGtal::LatticeSetByIntervals< TSpace >::myData |
Associate to each point its sequences of intervals.
Definition at line 664 of file LatticeSetByIntervals.h.
Referenced by DGtal::LatticeSetByIntervals< TSpace >::add(), DGtal::LatticeSetByIntervals< TSpace >::clear(), DGtal::LatticeSetByIntervals< TSpace >::data(), DGtal::LatticeSetByIntervals< TSpace >::empty(), DGtal::LatticeSetByIntervals< TSpace >::equals(), DGtal::LatticeSetByIntervals< TSpace >::erase(), DGtal::LatticeSetByIntervals< TSpace >::extremaOfCells(), DGtal::LatticeSetByIntervals< TSpace >::includes(), DGtal::LatticeSetByIntervals< TSpace >::insert(), DGtal::LatticeSetByIntervals< TSpace >::LatticeSetByIntervals(), DGtal::LatticeSetByIntervals< TSpace >::max_size(), DGtal::LatticeSetByIntervals< TSpace >::purge(), DGtal::LatticeSetByIntervals< TSpace >::setAxis(), DGtal::LatticeSetByIntervals< TSpace >::size(), DGtal::LatticeSetByIntervals< TSpace >::skeletonOfCells(), DGtal::LatticeSetByIntervals< TSpace >::starOfCells(), DGtal::LatticeSetByIntervals< TSpace >::starOfPoints(), DGtal::LatticeSetByIntervals< TSpace >::subtract(), and DGtal::LatticeSetByIntervals< TSpace >::toPointRange().