DGtal
0.9.2
|
#include <DGtal/kernel/domains/Linearizer.h>
Public Types | |
typedef HyperRectDomain< TSpace > | Domain |
typedef TSpace::Point | Point |
typedef Point | Extent |
typedef TSpace::Size | Size |
Static Public Member Functions | |
static Size | getIndex (Point aPoint, Point const &aLowerBound, Extent const &anExtent) |
static Size | getIndex (Point aPoint, Extent const &anExtent) |
static Size | getIndex (Point aPoint, Domain const &aDomain) |
static Point | getPoint (Size anIndex, Point const &aLowerBound, Extent const &anExtent) |
static Point | getPoint (Size anIndex, Extent const &anExtent) |
static Point | getPoint (Size anIndex, Domain const &aDomain) |
Aim: Linearization and de-linearization interface for HyperRectDomain.
This is a static class that provides point linearization (point to index) and de-linearization (index to point) for storages working on HyperRectDomain.
The storage order can be specified by template (default is colum-major ordered).
Example:
TSpace | Type of the space of the HyperRectDomain (auto-deduced from TDomain template, see Linearizer). |
TStorageOrder | Storage Order (RowMajorStorage of ColMajorStorage). |
Definition at line 107 of file Linearizer.h.
typedef HyperRectDomain<TSpace> DGtal::Linearizer< HyperRectDomain< TSpace >, TStorageOrder >::Domain |
The domain type.
Definition at line 110 of file Linearizer.h.
typedef Point DGtal::Linearizer< HyperRectDomain< TSpace >, TStorageOrder >::Extent |
The domain's extent type.
Definition at line 112 of file Linearizer.h.
typedef TSpace::Point DGtal::Linearizer< HyperRectDomain< TSpace >, TStorageOrder >::Point |
The point type.
Definition at line 111 of file Linearizer.h.
typedef TSpace::Size DGtal::Linearizer< HyperRectDomain< TSpace >, TStorageOrder >::Size |
The space's size type.
Definition at line 113 of file Linearizer.h.
|
inlinestatic |
Linearized index of a point, given the domain lower-bound and extent.
[in] | aPoint | The point to be linearized. |
[in] | aLowerBound | The lower-bound of the domain. |
[in] | anExtent | The extent of the domain. |
|
inlinestatic |
Linearized index of a point, given the domain extent.
The lower-bound of the domain is defined to the origin.
[in] | aPoint | The Point to be linearized. |
[in] | anExtent | The extent of the domain. |
|
inlinestatic |
Linearized index of a point, given a domain.
[in] | aPoint | The Point to be linearized. |
[in] | aDomain | The domain. |
|
inlinestatic |
De-linearization of an index, given the domain lower-bound and extent.
[in] | anIndex | The linearized index. |
[in] | aLowerBound | The lower-bound of the domain. |
[in] | anExtent | The domain extent. |
|
inlinestatic |
De-linearization of an index, given the domain extent.
The lower-bound of the domain is set to the origin.
[in] | anIndex | The linearized index. |
[in] | anExtent | The domain extent. |
|
inlinestatic |
De-linearization of an index, given a domain.
[in] | anIndex | The linearized index. |
[in] | aDomain | The domain. |