File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::CellGeometryFunctions< TKSpace, i, N > Struct Template Reference

#include <DGtal/geometry/volumes/CellGeometry.h>

Inheritance diagram for DGtal::CellGeometryFunctions< TKSpace, i, N >:
[legend]

Public Types

typedef TKSpace KSpace
typedef KSpace::Space Space
typedef KSpace::Cell Cell
typedef KSpace::Point Point

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >))

Static Public Member Functions

template<typename PointelIterator>
static std::unordered_set< typename KSpace::CellgetIncidentCellsToPointels (const KSpace &K, PointelIterator itB, PointelIterator itE)
template<typename PointIterator>
static std::unordered_set< typename KSpace::CellgetIncidentCellsToPoints (const KSpace &K, PointIterator itB, PointIterator itE)
template<typename PointIterator>
static UnorderedSetByBlock< typename KSpace::Point, Splitter< typename KSpace::Point, uint64_t > > getIncidentKPointsToPoints (const KSpace &K, PointIterator itB, PointIterator itE)

Detailed Description

template<typename TKSpace, int i, int N>
struct DGtal::CellGeometryFunctions< TKSpace, i, N >

Utility class gathering some useful functions related to cell geometry and digital or cell convexity. It is meant to be specialized for low dimensions.

Template Parameters
TKSpacean arbitrary model of CCellularGridSpaceND.
ithe integer specifying the dimension of cells.
Nthe integer specifying the dimension of the digital space.

Definition at line 429 of file CellGeometry.h.

Member Typedef Documentation

◆ Cell

template<typename TKSpace, int i, int N>
typedef KSpace::Cell DGtal::CellGeometryFunctions< TKSpace, i, N >::Cell

Definition at line 434 of file CellGeometry.h.

◆ KSpace

template<typename TKSpace, int i, int N>
typedef TKSpace DGtal::CellGeometryFunctions< TKSpace, i, N >::KSpace

Definition at line 432 of file CellGeometry.h.

◆ Point

template<typename TKSpace, int i, int N>
typedef KSpace::Point DGtal::CellGeometryFunctions< TKSpace, i, N >::Point

Definition at line 435 of file CellGeometry.h.

◆ Space

template<typename TKSpace, int i, int N>
typedef KSpace::Space DGtal::CellGeometryFunctions< TKSpace, i, N >::Space

Definition at line 433 of file CellGeometry.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TKSpace, int i, int N>
DGtal::CellGeometryFunctions< TKSpace, i, N >::BOOST_CONCEPT_ASSERT ( (concepts::CCellularGridSpaceND< TKSpace >) )

◆ getIncidentCellsToPointels()

template<typename TKSpace, int i, int N>
template<typename PointelIterator>
std::unordered_set< typename KSpace::Cell > DGtal::CellGeometryFunctions< TKSpace, i, N >::getIncidentCellsToPointels ( const KSpace & K,
PointelIterator itB,
PointelIterator itE )
inlinestatic
Template Parameters
PointelIteratorany model of forward iterator on pointels.
Parameters
Ka valid cellular grid space large enough to hold the cells.
itBthe start of a range of pointels.
itEpast the end of a range of pointels.
Returns
the incident i-cells to the given range of pointels [itB, itE).
Note
General method. Note as efficient as specializations.

Definition at line 446 of file CellGeometry.h.

448 {
450 if ( i == 0 )
451 for ( auto it = itB; it != itE; ++it )
452 cells.insert( *it );
453 else
454 for ( auto it = itB; it != itE; ++it )
455 {
456 auto pointel = *it;
457 auto cofaces = K.uCoFaces( pointel );
458 for ( auto&& f : cofaces )
459 if ( K.uDim( f ) == i ) cells.insert( f );
460 }
461 return cells;
462 }

References K.

◆ getIncidentCellsToPoints()

template<typename TKSpace, int i, int N>
template<typename PointIterator>
std::unordered_set< typename KSpace::Cell > DGtal::CellGeometryFunctions< TKSpace, i, N >::getIncidentCellsToPoints ( const KSpace & K,
PointIterator itB,
PointIterator itE )
inlinestatic
Template Parameters
PointIteratorany model of forward iterator on points.
Parameters
Ka valid cellular grid space large enough to hold the cells.
itBthe start of a range of points.
itEpast the end of a range of points.
Returns
the incident i-cells to the given range of points [itB, itE).
Note
General method. Note as efficient as specializations.

Definition at line 473 of file CellGeometry.h.

475 {
477 if ( i == 0 )
478 for ( auto it = itB; it != itE; ++it )
479 cells.insert( K.uPointel( *it ) );
480 else
481 for ( auto it = itB; it != itE; ++it )
482 {
483 auto pointel = K.uPointel( *it );
484 auto cofaces = K.uCoFaces( pointel );
485 for ( auto&& f : cofaces )
486 if ( K.uDim( f ) == i ) cells.insert( f );
487 }
488 return cells;
489 }

References K.

◆ getIncidentKPointsToPoints()

template<typename TKSpace, int i, int N>
template<typename PointIterator>
UnorderedSetByBlock< typename KSpace::Point, Splitter< typename KSpace::Point, uint64_t > > DGtal::CellGeometryFunctions< TKSpace, i, N >::getIncidentKPointsToPoints ( const KSpace & K,
PointIterator itB,
PointIterator itE )
inlinestatic
Template Parameters
PointIteratorany model of forward iterator on points.
Parameters
Ka valid cellular grid space large enough to hold the cells.
itBthe start of a range of points.
itEpast the end of a range of points.
Returns
the incident i-kpoints to the given range of points [itB, itE).
Note
General method. Note as efficient as specializations.

Definition at line 501 of file CellGeometry.h.

503 {
506 if ( i == 0 )
507 for ( auto it = itB; it != itE; ++it )
508 kpoints.insert( K.uKCoords( K.uPointel( *it ) ) );
509 else
510 for ( auto it = itB; it != itE; ++it )
511 {
512 auto pointel = K.uPointel( *it );
513 auto cofaces = K.uCoFaces( pointel );
514 for ( auto&& f : cofaces )
515 if ( K.uDim( f ) == i ) kpoints.insert( K.uKCoords( f ) );
516 }
517 return kpoints;
518 }

References K.


The documentation for this struct was generated from the following file: