Aim: Linearization and de-linearization interface for HyperRectDomain.
More...
#include <DGtal/kernel/domains/Linearizer.h>
template<typename TSpace, typename TStorageOrder>
struct DGtal::Linearizer< HyperRectDomain< TSpace >, TStorageOrder >
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:
typedef SpaceND<2>
Space;
tydedef HyperRectDomain<Space>
Domain;
TSpace::Point Point
The point type.
HyperRectDomain< TSpace > Domain
The domain type.
Linearizer< Domain, ColMajorStorage > Linearizer
HyperRectDomain< Space > Domain
- Template Parameters
-
Definition at line 107 of file Linearizer.h.
◆ Domain
template<typename TSpace , typename TStorageOrder >
◆ Extent
template<typename TSpace , typename TStorageOrder >
◆ Point
template<typename TSpace , typename TStorageOrder >
◆ Size
template<typename TSpace , typename TStorageOrder >
◆ getIndex() [1/3]
template<typename TSpace , typename TStorageOrder >
Linearized index of a point, given a domain.
- Parameters
-
[in] | aPoint | The Point to be linearized. |
[in] | aDomain | The domain. |
- Returns
- the linearized index of the point.
◆ getIndex() [2/3]
template<typename TSpace , typename TStorageOrder >
Linearized index of a point, given the domain extent.
The lower-bound of the domain is defined to the origin.
- Parameters
-
[in] | aPoint | The Point to be linearized. |
[in] | anExtent | The extent of the domain. |
- Returns
- the linearized index of the point.
◆ getIndex() [3/3]
template<typename TSpace , typename TStorageOrder >
Linearized index of a point, given the domain lower-bound and extent.
- Parameters
-
[in] | aPoint | The point to be linearized. |
[in] | aLowerBound | The lower-bound of the domain. |
[in] | anExtent | The extent of the domain. |
- Returns
- the linearized index of the point.
◆ getPoint() [1/3]
template<typename TSpace , typename TStorageOrder >
De-linearization of an index, given a domain.
- Parameters
-
[in] | anIndex | The linearized index. |
[in] | aDomain | The domain. |
- Returns
- the point whose linearized index is anIndex.
◆ getPoint() [2/3]
template<typename TSpace , typename TStorageOrder >
De-linearization of an index, given the domain extent.
The lower-bound of the domain is set to the origin.
- Parameters
-
[in] | anIndex | The linearized index. |
[in] | anExtent | The domain extent. |
- Returns
- the point whose linearized index is anIndex.
◆ getPoint() [3/3]
template<typename TSpace , typename TStorageOrder >
De-linearization of an index, given the domain lower-bound and extent.
- Parameters
-
[in] | anIndex | The linearized index. |
[in] | aLowerBound | The lower-bound of the domain. |
[in] | anExtent | The domain extent. |
- Returns
- the point whose linearized index is anIndex.
The documentation for this struct was generated from the following file: