TTK
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ttk::Triangulation Class Referencefinal

Triangulation is a class that provides time and memory efficient traversal methods on triangulations of piecewise linear manifolds. It provides the following features: More...

#include <Triangulation.h>

Inheritance diagram for ttk::Triangulation:
ttk::AbstractTriangulation ttk::Wrapper ttk::Debug ttk::BaseClass

Public Types

enum class  Type {
  EXPLICIT , IMPLICIT , HYBRID_IMPLICIT , PERIODIC ,
  HYBRID_PERIODIC , COMPACT
}
 
enum class  STRATEGY { DEFAULT = 0 , WITH_PRECONDITIONS = 1 , NO_PRECONDITIONS = 2 }
 

Public Member Functions

 Triangulation ()
 
 Triangulation (const Triangulation &)
 
 Triangulation (Triangulation &&) noexcept
 
Triangulationoperator= (const Triangulation &)
 
Triangulationoperator= (Triangulation &&) noexcept
 
 ~Triangulation () override
 
int clear ()
 
size_t footprint () const
 
int getCellEdge (const SimplexId &cellId, const int &localEdgeId, SimplexId &edgeId) const override
 
SimplexId getCellEdgeNumber (const SimplexId &cellId) const override
 
const std::vector< std::vector< SimplexId > > * getCellEdges () override
 
int getCellIncenter (SimplexId cellId, int dim, float incenter[3]) const
 
int getCellNeighbor (const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const override
 
SimplexId getCellNeighborNumber (const SimplexId &cellId) const override
 
const std::vector< std::vector< SimplexId > > * getCellNeighbors () override
 
int getCellTriangle (const SimplexId &cellId, const int &localTriangleId, SimplexId &triangleId) const override
 
SimplexId getCellTriangleNumber (const SimplexId &cellId) const override
 
const std::vector< std::vector< SimplexId > > * getCellTriangles () override
 
int getCellVertex (const SimplexId &cellId, const int &localVertexId, SimplexId &vertexId) const override
 
SimplexId getCellVertexNumber (const SimplexId &cellId) const override
 
int getDimensionality () const override
 
const std::vector< std::array< SimplexId, 2 > > * getEdges () override
 
int getEdgeIncenter (SimplexId edgeId, float incenter[3]) const
 
int getTriangleIncenter (SimplexId triangleId, float incenter[3]) const
 
int getEdgeLink (const SimplexId &edgeId, const int &localLinkId, SimplexId &linkId) const override
 
SimplexId getEdgeLinkNumber (const SimplexId &edgeId) const override
 
const std::vector< std::vector< SimplexId > > * getEdgeLinks () override
 
int getEdgeStar (const SimplexId &edgeId, const int &localStarId, SimplexId &starId) const override
 
SimplexId getEdgeStarNumber (const SimplexId &edgeId) const override
 
const std::vector< std::vector< SimplexId > > * getEdgeStars () override
 
int getEdgeTriangle (const SimplexId &edgeId, const int &localTriangleId, SimplexId &triangleId) const override
 
SimplexId getEdgeTriangleNumber (const SimplexId &edgeId) const override
 
const std::vector< std::vector< SimplexId > > * getEdgeTriangles () override
 
int getEdgeVertex (const SimplexId &edgeId, const int &localVertexId, SimplexId &vertexId) const override
 
AbstractTriangulationgetData ()
 
SimplexId getNumberOfCells () const override
 
SimplexId getNumberOfEdges () const override
 
SimplexId getNumberOfTriangles () const override
 
SimplexId getNumberOfVertices () const override
 
int getTetraIncenter (SimplexId tetraId, float incenter[3]) const
 
const std::vector< std::array< SimplexId, 3 > > * getTriangles () override
 
int getTriangleEdge (const SimplexId &triangleId, const int &localEdgeId, SimplexId &edgeId) const override
 
SimplexId getTriangleEdgeNumber (const SimplexId &triangleId) const override
 
const std::vector< std::vector< SimplexId > > * getTriangleEdges () override
 
int getTriangleLink (const SimplexId &triangleId, const int &localLinkId, SimplexId &linkId) const override
 
SimplexId getTriangleLinkNumber (const SimplexId &triangleId) const override
 
const std::vector< std::vector< SimplexId > > * getTriangleLinks () override
 
int getTriangleStar (const SimplexId &triangleId, const int &localStarId, SimplexId &starId) const override
 
SimplexId getTriangleStarNumber (const SimplexId &triangleId) const override
 
const std::vector< std::vector< SimplexId > > * getTriangleStars () override
 
int getTriangleVertex (const SimplexId &triangleId, const int &localVertexId, SimplexId &vertexId) const override
 
Triangulation::Type getType () const
 
int getVertexEdge (const SimplexId &vertexId, const int &localEdgeId, SimplexId &edgeId) const override
 
SimplexId getVertexEdgeNumber (const SimplexId &vertexId) const override
 
const std::vector< std::vector< SimplexId > > * getVertexEdges () override
 
int getVertexLink (const SimplexId &vertexId, const int &localLinkId, SimplexId &linkId) const override
 
SimplexId getVertexLinkNumber (const SimplexId &vertexId) const override
 
const std::vector< std::vector< SimplexId > > * getVertexLinks () override
 
int getVertexNeighbor (const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const override
 
SimplexId getVertexNeighborNumber (const SimplexId &vertexId) const override
 
const std::vector< std::vector< SimplexId > > * getVertexNeighbors () override
 
int getVertexPoint (const SimplexId &vertexId, float &x, float &y, float &z) const override
 
int getVertexStar (const SimplexId &vertexId, const int &localStarId, SimplexId &starId) const override
 
SimplexId getVertexStarNumber (const SimplexId &vertexId) const override
 
const std::vector< std::vector< SimplexId > > * getVertexStars () override
 
int getVertexTriangle (const SimplexId &vertexId, const int &localTriangleId, SimplexId &triangleId) const override
 
SimplexId getVertexTriangleNumber (const SimplexId &vertexId) const override
 
const std::vector< std::vector< SimplexId > > * getVertexTriangles () override
 
bool isEdgeOnBoundary (const SimplexId &edgeId) const override
 
bool isEmpty () const override
 
bool isManifold () const override
 
int preconditionManifold () override
 
bool isTriangleOnBoundary (const SimplexId &triangleId) const override
 
bool isVertexOnBoundary (const SimplexId &vertexId) const override
 
int preconditionBoundaryEdges () override
 
int preconditionBoundaryTriangles () override
 
int preconditionBoundaryVertices () override
 
int preconditionCellEdges () override
 
int preconditionCellNeighbors () override
 
int preconditionCellTriangles () override
 
int preconditionEdges () override
 
int preconditionEdgeLinks () override
 
int preconditionEdgeStars () override
 
int preconditionEdgeTriangles () override
 
int preconditionTriangles () override
 
int preconditionTriangleEdges () override
 
int preconditionTriangleLinks () override
 
int preconditionTriangleStars () override
 
int preconditionVertexEdges () override
 
int getCellVTKID (const int &ttkId, int &vtkId) const override
 
int preconditionVertexLinks () override
 
int preconditionVertexNeighbors () override
 
int preconditionVertexStars () override
 
int preconditionVertexTriangles () override
 
int setDebugLevel (const int &debugLevel) override
 Tune the debug level (default: 0)
 
int setCacheSize (const float &ratio)
 
int setInputCells (const SimplexId &cellNumber, const LongSimplexId *cellArray)
 
int setStellarInputCells (const SimplexId &cellNumber, const LongSimplexId *cellArray)
 
int setInputGrid (const float &xOrigin, const float &yOrigin, const float &zOrigin, const float &xSpacing, const float &ySpacing, const float &zSpacing, const SimplexId &xDim, const SimplexId &yDim, const SimplexId &zDim)
 
void setPeriodicBoundaryConditions (const bool &usePeriodicBoundaries)
 
void setImplicitPreconditions (const STRATEGY strategy)
 Set the input grid preconditioning strategy.
 
int setInputPoints (const SimplexId &pointNumber, const void *pointSet, const bool &doublePrecision=false)
 
int setStellarInputPoints (const SimplexId &pointNumber, const void *pointSet, const int *indexArray, const bool &doublePrecision=false)
 
int setThreadNumber (const ThreadId threadNumber) override
 Tune the number of active threads (default: number of logical cores)
 
int setWrapper (const Wrapper *wrapper) override
 
bool hasImplicitPreconditions () const
 Returns true if the grid uses preconditions.
 
- Public Member Functions inherited from ttk::AbstractTriangulation
 AbstractTriangulation ()
 
 ~AbstractTriangulation () override
 
 AbstractTriangulation (const AbstractTriangulation &)=default
 
 AbstractTriangulation (AbstractTriangulation &&)=default
 
AbstractTriangulationoperator= (const AbstractTriangulation &)=default
 
AbstractTriangulationoperator= (AbstractTriangulation &&)=default
 
int clear ()
 
size_t footprint (size_t size=0) const
 
int getEdgeVertexNumber (const SimplexId ttkNotUsed(edgeId)) const
 
virtual const std::array< SimplexId, 3 > & getGridDimensions () const
 
int getTriangleVertexNumber (const SimplexId ttkNotUsed(triangleId)) const
 
bool hasPeriodicBoundaries () const
 Returns true if the grid uses period boundary conditions.
 
int getEdgeIncenter (const SimplexId edgeId, float incenter[3]) const
 
int getTriangleIncenter (const SimplexId triangleId, float incenter[3]) const
 
int getTetraIncenter (const SimplexId tetraId, float incenter[3]) const
 
int getCellIncenter (const SimplexId cellid, const int dim, float incenter[3]) const
 
template<class itemType >
size_t tableTableFootprint (const vector< vector< itemType > > &table, const string &tableName, ostream &stream) const
 
- Public Member Functions inherited from ttk::Wrapper
 Wrapper ()
 
 ~Wrapper () override=default
 
virtual int updateProgress (const float &progress)=0
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 

Protected Member Functions

bool isEmptyCheck () const
 
bool processImplicitStrategy (const STRATEGY strategy=STRATEGY::DEFAULT) const
 Should we precondition the implicit/periodic triangulations?
 
void switchGrid (const bool usePeriodic, const bool usePreconditions)
 Switch regular grid triangulation type.
 
- Protected Member Functions inherited from ttk::AbstractTriangulation
virtual int getCellEdgeInternal (const SimplexId &ttkNotUsed(cellId), const int &ttkNotUsed(localEdgeId), SimplexId &ttkNotUsed(edgeId)) const
 
virtual SimplexId getCellEdgeNumberInternal (const SimplexId &ttkNotUsed(cellId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getCellEdgesInternal ()
 
virtual int getCellNeighborInternal (const SimplexId &ttkNotUsed(cellId), const int &ttkNotUsed(localNeighborId), SimplexId &ttkNotUsed(neighborId)) const
 
virtual SimplexId getCellNeighborNumberInternal (const SimplexId &ttkNotUsed(cellId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getCellNeighborsInternal ()
 
virtual int getCellTriangleInternal (const SimplexId &ttkNotUsed(cellId), const int &ttkNotUsed(localTriangleId), SimplexId &ttkNotUsed(triangleId)) const
 
virtual SimplexId getCellTriangleNumberInternal (const SimplexId &ttkNotUsed(cellId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getCellTrianglesInternal ()
 
virtual int getCellVertexInternal (const SimplexId &ttkNotUsed(cellId), const int &ttkNotUsed(localVertexId), SimplexId &ttkNotUsed(vertexId)) const
 
virtual SimplexId getCellVertexNumberInternal (const SimplexId &ttkNotUsed(cellId)) const
 
virtual int getDimensionalityInternal () const
 
virtual const std::vector< std::array< SimplexId, 2 > > * getEdgesInternal ()
 
virtual int getEdgeLinkInternal (const SimplexId &ttkNotUsed(edgeId), const int &ttkNotUsed(localLinkId), SimplexId &ttkNotUsed(linkId)) const
 
virtual SimplexId getEdgeLinkNumberInternal (const SimplexId &ttkNotUsed(edgeId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getEdgeLinksInternal ()
 
virtual int getEdgeStarInternal (const SimplexId &ttkNotUsed(edgeId), const int &ttkNotUsed(localStarId), SimplexId &ttkNotUsed(starId)) const
 
virtual SimplexId getEdgeStarNumberInternal (const SimplexId &ttkNotUsed(edgeId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getEdgeStarsInternal ()
 
virtual int getEdgeTriangleInternal (const SimplexId &ttkNotUsed(edgeId), const int &ttkNotUsed(localTriangleId), SimplexId &ttkNotUsed(triangleId)) const
 
virtual SimplexId getEdgeTriangleNumberInternal (const SimplexId &ttkNotUsed(edgeId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getEdgeTrianglesInternal ()
 
virtual int getEdgeVertexInternal (const SimplexId &ttkNotUsed(edgeId), const int &ttkNotUsed(localVertexId), SimplexId &ttkNotUsed(vertexId)) const
 
virtual SimplexId getNumberOfCellsInternal () const
 
virtual SimplexId getNumberOfEdgesInternal () const
 
virtual SimplexId getNumberOfTrianglesInternal () const
 
virtual SimplexId getNumberOfVerticesInternal () const
 
virtual const std::vector< std::array< SimplexId, 3 > > * getTrianglesInternal ()
 
virtual int getTriangleEdgeInternal (const SimplexId &ttkNotUsed(triangleId), const int &ttkNotUsed(localEdgeId), SimplexId &ttkNotUsed(edgeId)) const
 
virtual SimplexId getTriangleEdgeNumberInternal (const SimplexId &ttkNotUsed(triangleId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getTriangleEdgesInternal ()
 
virtual int getTriangleLinkInternal (const SimplexId &ttkNotUsed(triangleId), const int &ttkNotUsed(localLinkId), SimplexId &ttkNotUsed(linkId)) const
 
virtual SimplexId getTriangleLinkNumberInternal (const SimplexId &ttkNotUsed(triangleId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getTriangleLinksInternal ()
 
virtual int getTriangleStarInternal (const SimplexId &ttkNotUsed(triangleId), const int &ttkNotUsed(localStarId), SimplexId &ttkNotUsed(starId)) const
 
virtual SimplexId getTriangleStarNumberInternal (const SimplexId &ttkNotUsed(triangleId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getTriangleStarsInternal ()
 
virtual int getTriangleVertexInternal (const SimplexId &ttkNotUsed(triangleId), const int &ttkNotUsed(localVertexId), SimplexId &ttkNotUsed(vertexId)) const
 
virtual int getVertexEdgeInternal (const SimplexId &ttkNotUsed(vertexId), const int &ttkNotUsed(localEdgeId), SimplexId &ttkNotUsed(edgeId)) const
 
virtual SimplexId getVertexEdgeNumberInternal (const SimplexId &ttkNotUsed(vertexId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getVertexEdgesInternal ()
 
virtual int getVertexLinkInternal (const SimplexId &ttkNotUsed(vertexId), const int &ttkNotUsed(localLinkId), SimplexId &ttkNotUsed(linkId)) const
 
virtual SimplexId getVertexLinkNumberInternal (const SimplexId &ttkNotUsed(vertexId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getVertexLinksInternal ()
 
virtual int getVertexNeighborInternal (const SimplexId &ttkNotUsed(vertexId), const int &ttkNotUsed(localNeighborId), SimplexId &ttkNotUsed(neighborId)) const
 
virtual SimplexId getVertexNeighborNumberInternal (const SimplexId &ttkNotUsed(vertexId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getVertexNeighborsInternal ()
 
virtual int getVertexPointInternal (const SimplexId &ttkNotUsed(vertexId), float &ttkNotUsed(x), float &ttkNotUsed(y), float &ttkNotUsed(z)) const
 
virtual int getVertexStarInternal (const SimplexId &ttkNotUsed(vertexId), const int &ttkNotUsed(localStarId), SimplexId &ttkNotUsed(starId)) const
 
virtual SimplexId getVertexStarNumberInternal (const SimplexId &ttkNotUsed(vertexId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getVertexStarsInternal ()
 
virtual int getVertexTriangleInternal (const SimplexId &ttkNotUsed(vertexId), const int &ttkNotUsed(localTriangleId), SimplexId &ttkNotUsed(triangleId)) const
 
virtual SimplexId getVertexTriangleNumberInternal (const SimplexId &ttkNotUsed(vertexId)) const
 
virtual const std::vector< std::vector< SimplexId > > * getVertexTrianglesInternal ()
 
virtual bool isEdgeOnBoundaryInternal (const SimplexId &ttkNotUsed(edgeId)) const
 
virtual bool isTriangleOnBoundaryInternal (const SimplexId &ttkNotUsed(triangleId)) const
 
virtual bool isVertexOnBoundaryInternal (const SimplexId &ttkNotUsed(vertexId)) const
 
bool hasPreconditionedBoundaryEdges () const
 
bool hasPreconditionedBoundaryTriangles () const
 
bool hasPreconditionedBoundaryVertices () const
 
bool hasPreconditionedCellEdges () const
 
bool hasPreconditionedCellNeighbors () const
 
bool hasPreconditionedCellTriangles () const
 
bool hasPreconditionedEdgeLinks () const
 
bool hasPreconditionedEdgeStars () const
 
bool hasPreconditionedEdgeTriangles () const
 
bool hasPreconditionedEdges () const
 
bool hasPreconditionedTriangles () const
 
bool hasPreconditionedTriangleEdges () const
 
bool hasPreconditionedTriangleLinks () const
 
bool hasPreconditionedTriangleStars () const
 
bool hasPreconditionedVertexEdges () const
 
bool hasPreconditionedVertexLinks () const
 
bool hasPreconditionedVertexNeighbors () const
 
bool hasPreconditionedVertexStars () const
 
bool hasPreconditionedVertexTriangles () const
 
bool hasPreconditionedManifold () const
 
bool needsToAbort () override
 
virtual int preconditionBoundaryEdgesInternal ()
 
virtual int preconditionBoundaryTrianglesInternal ()
 
virtual int preconditionBoundaryVerticesInternal ()
 
virtual int preconditionCellEdgesInternal ()
 
virtual int preconditionCellNeighborsInternal ()
 
virtual int preconditionCellTrianglesInternal ()
 
virtual int preconditionEdgesInternal ()
 
virtual int preconditionEdgeLinksInternal ()
 
virtual int preconditionEdgeStarsInternal ()
 
virtual int preconditionEdgeTrianglesInternal ()
 
virtual int preconditionTrianglesInternal ()
 
virtual int preconditionTriangleEdgesInternal ()
 
virtual int preconditionTriangleLinksInternal ()
 
virtual int preconditionTriangleStarsInternal ()
 
virtual int preconditionVertexEdgesInternal ()
 
virtual int preconditionVertexLinksInternal ()
 
virtual int preconditionVertexNeighborsInternal ()
 
virtual int preconditionVertexStarsInternal ()
 
virtual int preconditionVertexTrianglesInternal ()
 
virtual int preconditionManifoldInternal ()
 
virtual int getCellVTKIDInternal (const int &ttkId, int &vtkId) const
 
template<class itemType >
size_t tableFootprint (const std::vector< itemType > &table, const std::string &tableName="", std::ostream &stream=std::cout) const
 
template<class itemType >
size_t tableTableFootprint (const std::vector< std::vector< itemType > > &table, const std::string &tableName="", std::ostream &stream=std::cout) const
 
int updateProgress (const float &ttkNotUsed(progress)) override
 
gradientCacheTypegetGradientCacheHandler () const
 
- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 

Protected Attributes

AbstractTriangulationabstractTriangulation_
 
ExplicitTriangulation explicitTriangulation_
 
ImplicitNoPreconditions implicitTriangulation_
 
ImplicitWithPreconditions implicitPreconditionsTriangulation_
 
PeriodicNoPreconditions periodicImplicitTriangulation_
 
PeriodicWithPreconditions periodicPreconditionsTriangulation_
 
CompactTriangulation compactTriangulation_
 
- Protected Attributes inherited from ttk::AbstractTriangulation
bool hasPeriodicBoundaries_
 
bool hasPreconditionedBoundaryEdges_
 
bool hasPreconditionedBoundaryTriangles_
 
bool hasPreconditionedBoundaryVertices_
 
bool hasPreconditionedCellEdges_
 
bool hasPreconditionedCellNeighbors_
 
bool hasPreconditionedCellTriangles_
 
bool hasPreconditionedEdges_
 
bool hasPreconditionedEdgeLinks_
 
bool hasPreconditionedEdgeStars_
 
bool hasPreconditionedEdgeTriangles_
 
bool hasPreconditionedTriangles_
 
bool hasPreconditionedTriangleEdges_
 
bool hasPreconditionedTriangleLinks_
 
bool hasPreconditionedTriangleStars_
 
bool hasPreconditionedVertexEdges_
 
bool hasPreconditionedVertexLinks_
 
bool hasPreconditionedVertexNeighbors_
 
bool hasPreconditionedVertexStars_
 
bool hasPreconditionedVertexTriangles_
 
bool hasPreconditionedManifold_
 
bool isManifold_ {true}
 
std::array< SimplexId, 3 > gridDimensions_
 
std::vector< bool > boundaryEdges_
 
std::vector< bool > boundaryTriangles_
 
std::vector< bool > boundaryVertices_
 
std::vector< std::array< SimplexId, 6 > > tetraEdgeList_
 
std::vector< std::vector< SimplexId > > cellNeighborList_
 
std::vector< std::array< SimplexId, 4 > > tetraTriangleList_
 
std::vector< std::vector< SimplexId > > edgeLinkList_
 
std::vector< std::array< SimplexId, 2 > > edgeList_
 
std::vector< std::vector< SimplexId > > edgeStarList_
 
std::vector< std::vector< SimplexId > > edgeTriangleList_
 
std::vector< std::array< SimplexId, 3 > > triangleList_
 
std::vector< std::array< SimplexId, 3 > > triangleEdgeList_
 
std::vector< std::vector< SimplexId > > triangleLinkList_
 
std::vector< std::vector< SimplexId > > triangleStarList_
 
std::vector< std::vector< SimplexId > > vertexEdgeList_
 
std::vector< std::vector< SimplexId > > vertexLinkList_
 
std::vector< std::vector< SimplexId > > vertexNeighborList_
 
std::vector< std::vector< SimplexId > > vertexStarList_
 
std::vector< std::vector< SimplexId > > vertexTriangleList_
 
std::vector< std::vector< SimplexId > > cellEdgeVector_ {}
 
std::vector< std::vector< SimplexId > > cellTriangleVector_ {}
 
std::vector< std::vector< SimplexId > > triangleEdgeVector_ {}
 
gradientCacheType gradientCache_ {}
 
- Protected Attributes inherited from ttk::Wrapper
float processingProgress_
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Protected Types inherited from ttk::AbstractTriangulation
using gradIdType = SimplexId
 
using gradientType = std::array< std::vector< gradIdType >, 6 >
 Discrete gradient internal struct.
 
using gradientKeyType = std::pair< const void *, size_t >
 Key type for gradientCacheType.
 
using gradientCacheType = LRUCache< gradientKeyType, gradientType >
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

Triangulation is a class that provides time and memory efficient traversal methods on triangulations of piecewise linear manifolds. It provides the following features:

Author
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Date
January 2016.
  1. Given a vertex, it provides: the list of edges that are connected to it, the list of its neighbors, its link, its star, etc.
    1. Given an edge, it provides: its vertices, its star, etc.
    2. Given a triangle, its provides: its vertices, its edges, etc.
    3. Given a tetrahedron, its provides: its vertices, its edges, its neighbor tetrahedra, etc.
    4. Given a triangulation, it provides: its list of vertices, edges, triangles and tetrahedra.

Triangulation supports both explicit and implicit triangulations:

  1. Explicit triangulations: Given a list of points and a list of cells, Triangulation provides time efficient accesses (requiring adequate preconditioning, see the documentation furtherdown).
  2. Implicit triangulations: Given a regular grid (origin, spacings and dimensions), Triangulation will perform an implicit triangulation of the grid, enabling both time and memory efficient traversals of triangulations of regular grids.

Apart from preconditions, Triangulation requires no memory overhead in addition to the input data.

Note
Only precondition the information you need! See the documentation further down.
See also
ttkTriangulation

Definition at line 48 of file Triangulation.h.

Member Enumeration Documentation

◆ STRATEGY

enum class ttk::Triangulation::STRATEGY
strong

Strategies for implicit & periodic triangulations preconditioning

Enumerator
DEFAULT 

No preconditions above a number of vertices threshold (given by TTK_IMPLICIT_PRECONDITIONS_THRESHOLD, default to 256^3)

WITH_PRECONDITIONS 

Always precondition implicit & periodic triangulations

NO_PRECONDITIONS 

Never precondition implicit & periodic triangulations

Definition at line 70 of file Triangulation.h.

◆ Type

enum class ttk::Triangulation::Type
strong
Enumerator
EXPLICIT 
IMPLICIT 
HYBRID_IMPLICIT 
PERIODIC 
HYBRID_PERIODIC 
COMPACT 

Definition at line 58 of file Triangulation.h.

Constructor & Destructor Documentation

◆ Triangulation() [1/3]

Triangulation::Triangulation ( )

Definition at line 6 of file Triangulation.cpp.

◆ Triangulation() [2/3]

Triangulation::Triangulation ( const Triangulation rhs)

Definition at line 12 of file Triangulation.cpp.

◆ Triangulation() [3/3]

Triangulation::Triangulation ( Triangulation &&  rhs)
noexcept

Definition at line 44 of file Triangulation.cpp.

◆ ~Triangulation()

Triangulation::~Triangulation ( )
overridedefault

Member Function Documentation

◆ clear()

int ttk::Triangulation::clear ( )
inline

Reset the triangulation data-structures.

Returns
Returns 0 upon success, negative values otherwise.

Definition at line 83 of file Triangulation.h.

◆ footprint()

size_t ttk::Triangulation::footprint ( ) const
inline

Computes and displays the memory footprint of the data-structure.

Returns
Returns 0 upon success, negative values otherwise.

Definition at line 94 of file Triangulation.h.

◆ getCellEdge()

int ttk::Triangulation::getCellEdge ( const SimplexId cellId,
const int &  localEdgeId,
SimplexId edgeId 
) const
inlineoverridevirtual

Get the localEdgeId-th edge of the cellId-th cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

In 1D, this function is equivalent to getCellNeighbor().

Precondition
For this function to behave correctly, preconditionCellEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
cellIdInput global cell identifier.
localEdgeIdInput local edge identifier, in [0, getCellEdgeNumber()].
edgeIdOutput global edge identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellEdgeNumber()
getCellNeighbor()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 124 of file Triangulation.h.

◆ getCellEdgeNumber()

SimplexId ttk::Triangulation::getCellEdgeNumber ( const SimplexId cellId) const
inlineoverridevirtual

Get the number of edges for the cellId-th cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

In 1D, this function is equivalent to getCellNeighborNumber().

Precondition
For this function to behave correctly, preconditionCellEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
cellIdInput global cell identifier.
Returns
Returns the number of cell edges.
See also
getCellNeighborNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 155 of file Triangulation.h.

◆ getCellEdges()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getCellEdges ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of edges for all cells.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

The number of entries in this list is equal to the number of cells. Each entry is a std::vector of identifiers whose size is equal to the number of edges for the corresponding cell.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

In 1D, this function is equivalent to getCellNeighbors().

Precondition
For this function to behave correctly, preconditionCellEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the cell edge list.
See also
getCellNeighbors()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 191 of file Triangulation.h.

◆ getCellIncenter()

int ttk::Triangulation::getCellIncenter ( SimplexId  cellId,
int  dim,
float  incenter[3] 
) const
inline

Definition at line 200 of file Triangulation.h.

◆ getCellNeighbor()

int ttk::Triangulation::getCellNeighbor ( const SimplexId cellId,
const int &  localNeighborId,
SimplexId neighborId 
) const
inlineoverridevirtual

Get the localNeighborId-th cell neighbor of the cellId-th cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Precondition
For this function to behave correctly, preconditionCellNeighbors() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
cellIdInput global cell identifier.
localNeighborIdInput local neighbor identifier, in [0, getCellNeighborNumber()].
neighborIdOutput global neighbor cell identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellNeighborNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 227 of file Triangulation.h.

◆ getCellNeighborNumber()

SimplexId ttk::Triangulation::getCellNeighborNumber ( const SimplexId cellId) const
inlineoverridevirtual

Get the number of cell neighbors for the cellId-th cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Precondition
For this function to behave correctly, preconditionCellNeighbors() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
cellIdInput global cell identifier.
Returns
Returns the number of cell neighbors.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 256 of file Triangulation.h.

◆ getCellNeighbors()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getCellNeighbors ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of cell neighbors for all cells.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

The number of entries in this list is equal to the number of cells. Each entry is a std::vector of identifiers whose size is equal to the number of neighbor cells for the corresponding cell.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionCellNeighbors() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the cell neighbor list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 291 of file Triangulation.h.

◆ getCellTriangle()

int ttk::Triangulation::getCellTriangle ( const SimplexId cellId,
const int &  localTriangleId,
SimplexId triangleId 
) const
inlineoverridevirtual

Get the localTriangleId-th triangle id of the cellId-th cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

In 2D, this function is equivalent to getCellNeighbor().

Precondition
For this function to behave correctly, preconditionCellTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
cellIdInput global cell identifier.
localTriangleIdInput local triangle identifier, in [0, getCellTriangleNumber()].
triangleIdOutput global triangle identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellTriangleNumber()
getCellNeighbor()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 321 of file Triangulation.h.

◆ getCellTriangleNumber()

SimplexId ttk::Triangulation::getCellTriangleNumber ( const SimplexId cellId) const
inlineoverridevirtual

Get the number of triangles for the cellId-th cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

In 2D, this function is equivalent to getCellNeighborNumber().

Precondition
For this function to behave correctly, preconditionCellTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
cellIdInput global cell identifier.
Returns
Returns the number of cell triangles.
See also
getCellNeighborNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 354 of file Triangulation.h.

◆ getCellTriangles()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getCellTriangles ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of triangles for all cells.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Also, the notion of triangle only makes sense if the triangulation has a dimension greater than 2 (otherwise, use the cell information).

The number of entries in this list is equal to the number of cells. Each entry is a std::vector of identifiers whose size is equal to the number of triangles for the corresponding cell.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

In 2D, this function is equivalent to getCellNeighbors().

Precondition
For this function to behave correctly, preconditionCellTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the cell triangle list.
See also
getCellNeighbors()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 394 of file Triangulation.h.

◆ getCellVertex()

int ttk::Triangulation::getCellVertex ( const SimplexId cellId,
const int &  localVertexId,
SimplexId vertexId 
) const
inlineoverridevirtual

Get the localVertexId-th vertex identifier of the cellId-th cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Parameters
cellIdInput global cell identifier.
localVertexIdInput local vertex identifier, in [0, getCellVertexNumber()].
vertexIdOutput global vertex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellVertexNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 413 of file Triangulation.h.

◆ getCellVertexNumber()

SimplexId ttk::Triangulation::getCellVertexNumber ( const SimplexId cellId) const
inlineoverridevirtual

Get the number of vertices in a cell.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Parameters
cellIdInput global cell identifier.
Returns
Number of vertices in the cell.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 436 of file Triangulation.h.

◆ getCellVTKID()

int ttk::Triangulation::getCellVTKID ( const int &  ttkId,
int &  vtkId 
) const
inlineoverridevirtual
Precondition
Get the VTK id of a cell using the TTK id of a cell. For implicit triangulations, VTK cells are squares or cubes, whereas TTK cells are triangles and tetrahedron. For other triangulations, the TTK and VTK cells coincide.
Parameters
ttkIdTTK cell id
vtkIdOutput VTK cell id
Returns
Returns 0 upon success, negative values otherwise.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2425 of file Triangulation.h.

◆ getData()

AbstractTriangulation * ttk::Triangulation::getData ( )
inline

Get the internal abstract triangulation object.

Returns
Returns a pointer to the internal abstract triangulation object.

Definition at line 832 of file Triangulation.h.

◆ getDimensionality()

int ttk::Triangulation::getDimensionality ( ) const
inlineoverridevirtual

Get the dimensionality of the triangulation (this value is equal to the dimension of the simplex with largest dimensionality).

Returns
Returns the dimensionality of the triangulation.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 448 of file Triangulation.h.

◆ getEdgeIncenter()

int ttk::Triangulation::getEdgeIncenter ( SimplexId  edgeId,
float  incenter[3] 
) const
inline

Compute the barycenter of the points of the given edge identifier.

Precondition
For this function to behave correctly, preconditionEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Parameters
edgeIdInput global edge identifier.
incenterOutput barycenter.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleIncenter()
getCellIncenter()

Definition at line 499 of file Triangulation.h.

◆ getEdgeLink()

int ttk::Triangulation::getEdgeLink ( const SimplexId edgeId,
const int &  localLinkId,
SimplexId linkId 
) const
inlineoverridevirtual

Get the localLinkId-th simplex of the link of the edgeId-th edge.

The output linkId refers in 2D to a vertex identifier and in 3D to an edge identifier. It returns a negative value in 1D.

Precondition
For this function to behave correctly, preconditionEdgeLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier.
localLinkIdInput local link simplex identifier, in [0, getEdgeLinkNumber()].
linkIdOutput link simplex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdgeLinkNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 546 of file Triangulation.h.

◆ getEdgeLinkNumber()

SimplexId ttk::Triangulation::getEdgeLinkNumber ( const SimplexId edgeId) const
inlineoverridevirtual

Get the number of simplicies in the link of the edgeId-th edge.

In 2D, this will return the number of vertices in the link, in 3D the number of edges. It returns a negative value in 1D.

Precondition
For this function to behave correctly, preconditionEdgeLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier.
Returns
Returns the number of cells in the link of the edge.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 573 of file Triangulation.h.

◆ getEdgeLinks()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getEdgeLinks ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of link simplices for all edges.

The number of entries in this list is equal to the number of edges. Each entry is a std::vector of identifiers representing vertices in 2D and edges in 3D. It returns NULL in 1D.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionEdgeLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the edge link list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 604 of file Triangulation.h.

◆ getEdges()

const std::vector< std::array< SimplexId, 2 > > * ttk::Triangulation::getEdges ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of edges of the triangulation.

Here the notion of edge only makes sense if the triangulation has a dimension greater than 1 (otherwise, use the cell information).

The number of entries in this list is equal to the number of edges. Each entry is a std::pair of vertex identifiers.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the edge list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 480 of file Triangulation.h.

◆ getEdgeStar()

int ttk::Triangulation::getEdgeStar ( const SimplexId edgeId,
const int &  localStarId,
SimplexId starId 
) const
inlineoverridevirtual

Get the localStarId-th cell of the star of the edgeId-th edge.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Also, the notion of edge only makes sense if the triangulation has a dimension greater than 1 (otherwise, use the cell information).

Precondition
For this function to behave correctly, preconditionEdgeStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier.
localStarIdInput local star cell identifier, in [0, getEdgeStarNumber()].
starIdOutput global star cell identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdgeStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 634 of file Triangulation.h.

◆ getEdgeStarNumber()

SimplexId ttk::Triangulation::getEdgeStarNumber ( const SimplexId edgeId) const
inlineoverridevirtual

Get the number of star cells for the edgeId-th edge.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Also, the notion of edge only makes sense if the triangulation has a dimension greater than 1 (otherwise, use the cell information).

Precondition
For this function to behave correctly, preconditionEdgeStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier
Returns
Returns the number of star cells.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 664 of file Triangulation.h.

◆ getEdgeStars()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getEdgeStars ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of star cell identifiers for all edges.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Also, the notion of edge only makes sense if the triangulation has a dimension greater than 1 (otherwise, use the cell information).

The number of entries in this list is equal to the number of edges. Each entry is a std::vector of identifiers whose size is equal to the number of star cells for the corresponding edge.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionEdgeStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the edge star list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 700 of file Triangulation.h.

◆ getEdgeTriangle()

int ttk::Triangulation::getEdgeTriangle ( const SimplexId edgeId,
const int &  localTriangleId,
SimplexId triangleId 
) const
inlineoverridevirtual

Get the localTriangleId-th triangle id of the edgeId-th edge.

In 2D, this function is equivalent to getEdgeStar().

Precondition
For this function to behave correctly, preconditionEdgeTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier.
localTriangleIdInput local triangle identifier, in [0, getEdgeTriangleNumber()].
triangleIdOutput global triangle identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdgeTriangleNumber()
getEdgeStar()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 727 of file Triangulation.h.

◆ getEdgeTriangleNumber()

SimplexId ttk::Triangulation::getEdgeTriangleNumber ( const SimplexId edgeId) const
inlineoverridevirtual

Get the number of triangles for the edgeId-th edge.

In 2D, this function is equivalent to getEdgeStarNumber().

Precondition
For this function to behave correctly, preconditionEdgeTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier.
Returns
Returns the number of edge triangles.
See also
getEdgeStarNumber

Reimplemented from ttk::AbstractTriangulation.

Definition at line 757 of file Triangulation.h.

◆ getEdgeTriangles()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getEdgeTriangles ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of triangles for all edges.

The number of entries in this list is equal to the number of edges. Each entry is a std::vector of identifiers whose size is equal to the number of triangles for the corresponding edge.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

In 2D, this function is equivalent to getEdgeStars().

Precondition
For this function to behave correctly, preconditionEdgeTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the edge triangle list.
See also
getEdgeStars

Reimplemented from ttk::AbstractTriangulation.

Definition at line 791 of file Triangulation.h.

◆ getEdgeVertex()

int ttk::Triangulation::getEdgeVertex ( const SimplexId edgeId,
const int &  localVertexId,
SimplexId vertexId 
) const
inlineoverridevirtual

Get the localVertexId-th vertex identifier of the edgeId-th edge.

In 1D, this function is equivalent to getCellVertex().

Precondition
For this function to behave correctly, preconditionEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier.
localVertexIdInput local vertex identifier (0 or 1).
vertexIdOutput global vertex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellVertex()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 816 of file Triangulation.h.

◆ getNumberOfCells()

SimplexId ttk::Triangulation::getNumberOfCells ( ) const
inlineoverridevirtual

Get the number of cells in the triangulation.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Returns
Returns the number of cells.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 841 of file Triangulation.h.

◆ getNumberOfEdges()

SimplexId ttk::Triangulation::getNumberOfEdges ( ) const
inlineoverridevirtual

Get the number of edges in the triangulation.

In 1D, this function is equivalent to getNumberOfCells().

Precondition
For this function to behave correctly, preconditionEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns the number of edges.
See also
getNumberOfCells()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 864 of file Triangulation.h.

◆ getNumberOfTriangles()

SimplexId ttk::Triangulation::getNumberOfTriangles ( ) const
inlineoverridevirtual

Get the number of triangles in the triangulation.

In 2D, this function is equivalent to getNumberOfCells().

Precondition
For this function to behave correctly, preconditionTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns the number of triangles.
See also
getNumberOfCells()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 885 of file Triangulation.h.

◆ getNumberOfVertices()

SimplexId ttk::Triangulation::getNumberOfVertices ( ) const
inlineoverridevirtual

Get the number of vertices in the triangulation.

Returns
Returns the number of vertices.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 896 of file Triangulation.h.

◆ getTetraIncenter()

int ttk::Triangulation::getTetraIncenter ( SimplexId  tetraId,
float  incenter[3] 
) const
inline

Compute the barycenter of the points of the given tet identifier.

Parameters
tetraIdInput global tet identifier.
incenterOutput barycenter.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleIncenter()
getEdgeIncenter()

Definition at line 911 of file Triangulation.h.

◆ getTriangleEdge()

int ttk::Triangulation::getTriangleEdge ( const SimplexId triangleId,
const int &  localEdgeId,
SimplexId edgeId 
) const
inlineoverridevirtual

Get the localEdgeId-th edge of the triangleId-th triangle.

In 2D, this function is equivalent to getCellEdge().

Precondition
For this function to behave correctly, preconditionTriangleEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global triangle identifier.
localEdgeIdInput local edge identifier, in [0, getTriangleEdgeNumber()].
edgeIdOutput global edge identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleEdgeNumber()
getCellEdge()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 970 of file Triangulation.h.

◆ getTriangleEdgeNumber()

SimplexId ttk::Triangulation::getTriangleEdgeNumber ( const SimplexId triangleId) const
inlineoverridevirtual

Get the number of edges of the triangleId-th triangle.

In 2D, this function is equivalent to getCellEdgeNumber().

Precondition
For this function to behave correctly, preconditionTriangleEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global triangle identifier.
Returns
Returns the number of cells in the link of the triangle.
See also
getCellEdgeNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 999 of file Triangulation.h.

◆ getTriangleEdges()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getTriangleEdges ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of edges for all triangles.

The number of entries in this list is equal to the number of triangles. Each entry is a std::vector of identifiers representing the edges connected to the triangle (3).

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

In 2D, this function is equivalent to getCellEdges().

Precondition
For this function to behave correctly, preconditionTriangleEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the triangle edge list.
See also
getCellEdges()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1033 of file Triangulation.h.

◆ getTriangleIncenter()

int ttk::Triangulation::getTriangleIncenter ( SimplexId  triangleId,
float  incenter[3] 
) const
inline

Compute the barycenter of the points of the given triangle identifier.

Precondition
For this function to behave correctly, preconditionTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Parameters
triangleIdInput global triangle identifier.
incenterOutput barycenter.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdgeIncenter()
getCellIncenter()

Definition at line 518 of file Triangulation.h.

◆ getTriangleLink()

int ttk::Triangulation::getTriangleLink ( const SimplexId triangleId,
const int &  localLinkId,
SimplexId linkId 
) const
inlineoverridevirtual

Get the localLinkId-th simplex of the link of the triangleId-th triangle.

The notion of triangle link only makes sense in 3D, where the output linkId refers to a vertex identifier.

Precondition
For this function to behave correctly, preconditionTriangleLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global triangle identifier.
localLinkIdInput local link simplex identifier, in [0, getTriangleLinkNumber()].
linkIdOutput link simplex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleLinkNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1060 of file Triangulation.h.

◆ getTriangleLinkNumber()

SimplexId ttk::Triangulation::getTriangleLinkNumber ( const SimplexId triangleId) const
inlineoverridevirtual

Get the number of simplices in the link of the triangleId-th triangle.

The notion of triangle link only makes sense in 3D, where the number of vertices in the link will be returned.

Precondition
For this function to behave correctly, preconditionTriangleLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global triangle identifier.
Returns
Returns the number of simplices in the link of the triangle.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1090 of file Triangulation.h.

◆ getTriangleLinks()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getTriangleLinks ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of link simplices for all triangles.

The number of entries in this list is equal to the number of triangles. Each entry is a std::vector of identifiers representing a vertex.

The notion of triangle link only makes sense in 3D.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionTriangleLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the triangle link list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1123 of file Triangulation.h.

◆ getTriangles()

const std::vector< std::array< SimplexId, 3 > > * ttk::Triangulation::getTriangles ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of triangles of the triangulation.

Here the notion of triangle only makes sense if the triangulation has a dimension greater than 2 (otherwise, use the cell information).

The number of entries in this list is equal to the number of triangles. Each entry is a std::vector of vertex identifiers.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the triangle list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 944 of file Triangulation.h.

◆ getTriangleStar()

int ttk::Triangulation::getTriangleStar ( const SimplexId triangleId,
const int &  localStarId,
SimplexId starId 
) const
inlineoverridevirtual

Get the localStarId-th cell of the star of the triangleId-th triangle.

The notion of triangle star only makes sense in 3D, where the output starId refers to a tetrahedron identifier.

Precondition
For this function to behave correctly, preconditionTriangleStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global triangle identifier.
localStarIdInput local star cell identifier, in [0, getTriangleStarNumber()].
starIdOutput global star cell identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1151 of file Triangulation.h.

◆ getTriangleStarNumber()

SimplexId ttk::Triangulation::getTriangleStarNumber ( const SimplexId triangleId) const
inlineoverridevirtual

Get the number of star cells for the triangleId-th triangle.

The notion of triangle star only makes sense in 3D, where the number of tetrahedra in the star will be returned.

Precondition
For this function to behave correctly, preconditionTriangleStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global triangle identifier.
Returns
Returns the number of star cells.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1180 of file Triangulation.h.

◆ getTriangleStars()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getTriangleStars ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of star cell identifiers for all triangles.

The number of entries in this list is equal to the number of triangles. Each entry is a std::vector of identifiers whose size is equal to the number of star cells for the corresponding triangle.

The notion of triangle star only makes sense in 3D.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionTriangleStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the triangle star list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1214 of file Triangulation.h.

◆ getTriangleVertex()

int ttk::Triangulation::getTriangleVertex ( const SimplexId triangleId,
const int &  localVertexId,
SimplexId vertexId 
) const
inlineoverridevirtual

Get the localVertexId-th vertex identifier of the triangleId-th triangle.

In 2D, this function is equivalent to getCellVertex().

Precondition
For this function to behave correctly, preconditionTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global edge identifier.
localVertexIdInput local vertex identifier (in [0, 2]).
vertexIdOutput global vertex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellVertex()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1239 of file Triangulation.h.

◆ getType()

Triangulation::Type ttk::Triangulation::getType ( ) const
inline

Get the type of internal representation for the triangulation (explicit, implicit, periodic).

Returns
Returns the current type of the triangulation.
See also
setPeriodicBoundaryConditions()

Definition at line 1259 of file Triangulation.h.

◆ getVertexEdge()

int ttk::Triangulation::getVertexEdge ( const SimplexId vertexId,
const int &  localEdgeId,
SimplexId edgeId 
) const
inlineoverridevirtual

Get the localEdgeId-th edge identifier connected to the vertexId-th vertex.

In 1D, this function is equivalent to getVertexStar().

Precondition
For this function to behave correctly, preconditionVertexEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
localEdgeIdInput local edge identifier, in [0, getVertexEdgeNumber()].
edgeIdOutput global edge identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexEdgeNumber()
getVertexStar()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1294 of file Triangulation.h.

◆ getVertexEdgeNumber()

SimplexId ttk::Triangulation::getVertexEdgeNumber ( const SimplexId vertexId) const
inlineoverridevirtual

Get the number of edges connected to the vertexId-th vertex.

In 1D, this function is equivalent to getVertexStarNumber().

Precondition
For this function to behave correctly, preconditionVertexEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
Returns
Returns the number of edges connected to the vertex.
See also
getVertexStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1324 of file Triangulation.h.

◆ getVertexEdges()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getVertexEdges ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of edge identifiers for all vertices.

The number of entries in this list is equal to the number of vertices. Each entry is a std::vector of identifiers whose size is equal to the number of edges connected to the corresponding vertex.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

In 1D, this function is equivalent to getVertexStars()

Precondition
For this function to behave correctly, preconditionVertexEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the vertex edge list.
See also
getVertexStars()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1359 of file Triangulation.h.

◆ getVertexLink()

int ttk::Triangulation::getVertexLink ( const SimplexId vertexId,
const int &  localLinkId,
SimplexId linkId 
) const
inlineoverridevirtual

Get the localLinkId-th simplex of the link of the vertexId-th vertex.

The output linkId refers in 2D to an edge identifier and in 3D to a triangle identifier.

Precondition
For this function to behave correctly, preconditionVertexLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
localLinkIdInput local link simplex identifier, in [0, getVertexLinkNumber()].
linkIdOutput link simplex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexLinkNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1544 of file Triangulation.h.

◆ getVertexLinkNumber()

SimplexId ttk::Triangulation::getVertexLinkNumber ( const SimplexId vertexId) const
inlineoverridevirtual

Get the number of simplices in the link of the vertexId-th vertex.

In 2D, this will return the number of edges in the link, in 3D the number of triangles.

Precondition
For this function to behave correctly, preconditionVertexLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
Returns
Returns the number of cells in the link of the vertex.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1574 of file Triangulation.h.

◆ getVertexLinks()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getVertexLinks ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of link simplices for all vertices.

The number of entries in this list is equal to the number of vertices. Each entry is a std::vector of identifiers representing edges in 2D and triangles in 3D.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionVertexLinks() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the vertex link list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1608 of file Triangulation.h.

◆ getVertexNeighbor()

int ttk::Triangulation::getVertexNeighbor ( const SimplexId vertexId,
const int &  localNeighborId,
SimplexId neighborId 
) const
inlineoverridevirtual

Get the localNeighborId-th vertex neighbor of the vertexId-th vertex.

Precondition
For this function to behave correctly, preconditionVertexNeighbors() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
localNeighborIdInput local neighbor identifier, in [0, getVertexNeighborNumber()].
neighborIdOutput global neighbor vertex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexNeighborNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1633 of file Triangulation.h.

◆ getVertexNeighborNumber()

SimplexId ttk::Triangulation::getVertexNeighborNumber ( const SimplexId vertexId) const
inlineoverridevirtual

Get the number of vertex neighbors for the vertexId-th vertex.

Precondition
For this function to behave correctly, preconditionVertexNeighbors() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
Returns
Returns the number vertex neighbors.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1660 of file Triangulation.h.

◆ getVertexNeighbors()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getVertexNeighbors ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of vertex neighbor identifiers for all vertices.

The number of entries in this list is equal to the number of vertices. Each entry is a std::vector of identifiers whose size is equal to the number of vertex neighbors for the corresponding vertex.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionVertexNeighbors() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the vertex neighbor list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1693 of file Triangulation.h.

◆ getVertexPoint()

int ttk::Triangulation::getVertexPoint ( const SimplexId vertexId,
float &  x,
float &  y,
float &  z 
) const
inlineoverridevirtual

Get the point (3D coordinates) for the vertexId-th vertex.

Parameters
vertexIdInput global vertex identifier.
xOutput x coordinate.
yOutput y coordinate.
zOutput z coordinate.
Returns
Returns 0 upon success, negative values otherwise.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1707 of file Triangulation.h.

◆ getVertexStar()

int ttk::Triangulation::getVertexStar ( const SimplexId vertexId,
const int &  localStarId,
SimplexId starId 
) const
inlineoverridevirtual

Get the localStarId-th cell of the star of the vertexId-th vertex.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Precondition
For this function to behave correctly, preconditionVertexStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
localStarIdInput local star cell identifier, in [0, getVertexStarNumber()].
starIdOutput global star cell identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1744 of file Triangulation.h.

◆ getVertexStarNumber()

SimplexId ttk::Triangulation::getVertexStarNumber ( const SimplexId vertexId) const
inlineoverridevirtual

Get the number of star cells for the vertexId-th vertex.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Precondition
For this function to behave correctly, preconditionVertexStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier
Returns
Returns the number of star cells.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1774 of file Triangulation.h.

◆ getVertexStars()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getVertexStars ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of star cell identifiers for all vertices.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

The number of entries in this list is equal to the number of vertices. Each entry is a std::vector of identifiers whose size is equal to the number of star cells for the corresponding vertex.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

Precondition
For this function to behave correctly, preconditionVertexStars() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the vertex star list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1808 of file Triangulation.h.

◆ getVertexTriangle()

int ttk::Triangulation::getVertexTriangle ( const SimplexId vertexId,
const int &  localTriangleId,
SimplexId triangleId 
) const
inlineoverridevirtual

Get the localTriangleId-th triangle id of the vertexId-th vertex.

In 2D, this function is equivalent to getVertexStar().

Precondition
For this function to behave correctly, preconditionVertexTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
localTriangleIdInput local triangle identifier, in [0, getVertexTriangleNumber()].
triangleIdOutput global triangle identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexTriangleNumber()
getVertexStar()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1836 of file Triangulation.h.

◆ getVertexTriangleNumber()

SimplexId ttk::Triangulation::getVertexTriangleNumber ( const SimplexId vertexId) const
inlineoverridevirtual

Get the number of triangles for the vertexId-th vertex.

In 2D, this function is equivalent to getVertexStarNumber().

Precondition
For this function to behave correctly, preconditionVertexTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
Returns
Returns the number of vertex triangles.
See also
getVertexStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1866 of file Triangulation.h.

◆ getVertexTriangles()

const std::vector< std::vector< SimplexId > > * ttk::Triangulation::getVertexTriangles ( )
inlineoverridevirtual
Warning
YOU SHOULD NOT CALL THIS FUNCTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

Get the list of triangles for all vertices.

The number of entries in this list is equal to the number of vertices. Each entry is a std::vector of identifiers whose size is equal to the number of triangles for the corresponding vertex.

In implicit mode, this function will force the creation of such a list (which will be time and memory consuming). THIS IS USUALLY A BAD IDEA.

In 2D, this function is equivalent to getVertexStars().

Precondition
For this function to behave correctly, preconditionVertexTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Returns
Returns a pointer to the vertex triangle list.
See also
getVertexStars()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1901 of file Triangulation.h.

◆ hasImplicitPreconditions()

bool ttk::Triangulation::hasImplicitPreconditions ( ) const
inline

Returns true if the grid uses preconditions.

Definition at line 2944 of file Triangulation.h.

◆ isEdgeOnBoundary()

bool ttk::Triangulation::isEdgeOnBoundary ( const SimplexId edgeId) const
inlineoverridevirtual

Check if the edge with global identifier edgeId is on the boundary of the domain.

For 2D triangulations, this function will return true if the edge is a boundary edge. For 3D triangulations, this function will return true if the edge belongs to a boundary triangle.

Here the notion of edge only makes sense if the triangulation has a dimension greater than 1 (otherwise, use the cell information).

Precondition
For this function to behave correctly, preconditionBoundaryEdges() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
edgeIdInput global edge identifier.
Returns
Returns true if the edge is on the boundary, false otherwise.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1929 of file Triangulation.h.

◆ isEmpty()

bool ttk::Triangulation::isEmpty ( ) const
inlineoverridevirtual

Check if the data structure is empty or not.

Returns
Returns true if empty, false otherwise.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1939 of file Triangulation.h.

◆ isEmptyCheck()

bool ttk::Triangulation::isEmptyCheck ( ) const
inlineprotected

Definition at line 2982 of file Triangulation.h.

◆ isManifold()

bool ttk::Triangulation::isManifold ( ) const
inlineoverridevirtual

Check if the triangulation is manifold or not (Rips Complexes are not manifold)

Returns
True if the triangulation is manifold

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1946 of file Triangulation.h.

◆ isTriangleOnBoundary()

bool ttk::Triangulation::isTriangleOnBoundary ( const SimplexId triangleId) const
inlineoverridevirtual

Check if the triangle with global identifier triangleId is on the boundary of the domain.

Here the notion of triangle only makes sense if the triangulation has a dimension greater than 2 (otherwise, use the cell information).

For 2D triangulations, this function will return false all the time. For 3D triangulations, this function will return true if the triangle is a boundary triangle.

Precondition
For this function to behave correctly, preconditionBoundaryTriangles() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
triangleIdInput global triangle identifier.
Returns
Returns true if the triangle is on the boundary, false otherwise.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2004 of file Triangulation.h.

◆ isVertexOnBoundary()

bool ttk::Triangulation::isVertexOnBoundary ( const SimplexId vertexId) const
inlineoverridevirtual

Check if the vertex with global identifier vertexId is on the boundary of the domain.

For 2D triangulations, this function will return true if the vertex belongs to a boundary edge. For 3D triangulations, this function will return true if the vertex belongs to a boundary triangle.

Precondition
For this function to behave correctly, preconditionBoundaryVertices() needs to be called on this object prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude such a preconditioning step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
Returns
Returns true if the vertex is on the boundary, false otherwise.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2029 of file Triangulation.h.

◆ operator=() [1/2]

Triangulation & Triangulation::operator= ( const Triangulation rhs)

Definition at line 80 of file Triangulation.cpp.

◆ operator=() [2/2]

Triangulation & Triangulation::operator= ( Triangulation &&  rhs)
noexcept

Definition at line 117 of file Triangulation.cpp.

◆ preconditionBoundaryEdges()

int ttk::Triangulation::preconditionBoundaryEdges ( )
inlineoverridevirtual

Pre-process the boundary edges.

This function should ONLY be called as a pre-condition to the following function(s):

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
isEdgeOnBoundary()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2050 of file Triangulation.h.

◆ preconditionBoundaryTriangles()

int ttk::Triangulation::preconditionBoundaryTriangles ( )
inlineoverridevirtual

Pre-process the boundary triangles.

This function should ONLY be called as a pre-condition to the following function(s):

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
isTriangleOnBoundary()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2071 of file Triangulation.h.

◆ preconditionBoundaryVertices()

int ttk::Triangulation::preconditionBoundaryVertices ( )
inlineoverridevirtual

Pre-process the boundary vertices.

This function should ONLY be called as a pre-condition to the following function(s):

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
isVertexOnBoundary()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2093 of file Triangulation.h.

◆ preconditionCellEdges()

int ttk::Triangulation::preconditionCellEdges ( )
inlineoverridevirtual

Pre-process the cell edges.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellEdge()
getCellEdgeNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2116 of file Triangulation.h.

◆ preconditionCellNeighbors()

int ttk::Triangulation::preconditionCellNeighbors ( )
inlineoverridevirtual

Pre-process the cell neighbors.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellNeighbor()
getCellNeighbors()
getCellNeighborNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2142 of file Triangulation.h.

◆ preconditionCellTriangles()

int ttk::Triangulation::preconditionCellTriangles ( )
inlineoverridevirtual

Pre-process the cell triangles.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellTriangle()
getCellTriangles()
getCellTriangleNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2168 of file Triangulation.h.

◆ preconditionEdgeLinks()

int ttk::Triangulation::preconditionEdgeLinks ( )
inlineoverridevirtual

Pre-process the edge links.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdgeLink()
getEdgeLinks()
getEdgeLinkNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2221 of file Triangulation.h.

◆ preconditionEdges()

int ttk::Triangulation::preconditionEdges ( )
inlineoverridevirtual

Pre-process the edges.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdges()
getEdgeVertex()
getNumberOfEdges()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2194 of file Triangulation.h.

◆ preconditionEdgeStars()

int ttk::Triangulation::preconditionEdgeStars ( )
inlineoverridevirtual

Pre-process the edge stars.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdgeStar()
getEdgeStars()
getEdgeStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2247 of file Triangulation.h.

◆ preconditionEdgeTriangles()

int ttk::Triangulation::preconditionEdgeTriangles ( )
inlineoverridevirtual

Pre-process the edge triangles.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getEdgeTriangle()
getEdgeTriangles()
getEdgeTriangleNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2273 of file Triangulation.h.

◆ preconditionManifold()

int ttk::Triangulation::preconditionManifold ( )
inlineoverridevirtual

Check if the triangulation is manifold or not.

ttk::ExplicitTriangulation (and maybe ttk::CompactTriangulation too) can be generated from non-manifold datasets (such as a Rips Complex). Some TTK modules may be valid only for manifold triangulations, other may have alternatives for non-manifold data-sets (

See also
ttk::PersistenceDiagram::checkManifold).

This function should ONLY be called as a pre-condition to the following function(s):

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
isManifold()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1975 of file Triangulation.h.

◆ preconditionTriangleEdges()

int ttk::Triangulation::preconditionTriangleEdges ( )
inlineoverridevirtual

Pre-process the triangle edges.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleEdge()
getTriangleEdges()
getTriangleEdgeNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2326 of file Triangulation.h.

◆ preconditionTriangleLinks()

int ttk::Triangulation::preconditionTriangleLinks ( )
inlineoverridevirtual

Pre-process the triangle links.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleLink()
getTriangleLinks()
getTriangleLinkNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2352 of file Triangulation.h.

◆ preconditionTriangles()

int ttk::Triangulation::preconditionTriangles ( )
inlineoverridevirtual

Pre-process the triangles.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getNumberOfTriangles()
getTriangles()
getTriangleVertex()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2300 of file Triangulation.h.

◆ preconditionTriangleStars()

int ttk::Triangulation::preconditionTriangleStars ( )
inlineoverridevirtual

Pre-process the triangle stars.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleStar()
getTriangleStars()
getTriangleStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2378 of file Triangulation.h.

◆ preconditionVertexEdges()

int ttk::Triangulation::preconditionVertexEdges ( )
inlineoverridevirtual

Pre-process the vertex edges.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexEdge()
getVertexEdges()
getVertexEdgeNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2405 of file Triangulation.h.

◆ preconditionVertexLinks()

int ttk::Triangulation::preconditionVertexLinks ( )
inlineoverridevirtual

Pre-process the vertex links.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexLink()
getVertexLinks()
getVertexLinkNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2592 of file Triangulation.h.

◆ preconditionVertexNeighbors()

int ttk::Triangulation::preconditionVertexNeighbors ( )
inlineoverridevirtual

Pre-process the vertex neighbors.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexNeighbor()
getVertexNeighbors()
getVertexNeighborNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2619 of file Triangulation.h.

◆ preconditionVertexStars()

int ttk::Triangulation::preconditionVertexStars ( )
inlineoverridevirtual

Pre-process the vertex stars.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexStar()
getVertexStars()
getVertexStarNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2645 of file Triangulation.h.

◆ preconditionVertexTriangles()

int ttk::Triangulation::preconditionVertexTriangles ( )
inlineoverridevirtual

Pre-process the vertex triangles.

This function should ONLY be called as a pre-condition to the following functions:

Precondition
This function should be called prior to any traversal, in a clearly distinct pre-processing step that involves no traversal at all. An error will be returned otherwise.
Note
It is recommended to exclude this preconditioning function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
getVertexTriangle()
getVertexTriangles()
getVertexTriangleNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 2672 of file Triangulation.h.

◆ processImplicitStrategy()

bool Triangulation::processImplicitStrategy ( const STRATEGY  strategy = STRATEGY::DEFAULT) const
protected

Should we precondition the implicit/periodic triangulations?

Parameters
[in]strategyThe strategy to follow
Returns
True to perform preconditioning.

Definition at line 194 of file Triangulation.cpp.

◆ setCacheSize()

int ttk::Triangulation::setCacheSize ( const float &  ratio)
inline

Definition at line 2694 of file Triangulation.h.

◆ setDebugLevel()

int ttk::Triangulation::setDebugLevel ( const int &  debugLevel)
inlineoverridevirtual

Tune the debug level (default: 0)

Reimplemented from ttk::Debug.

Definition at line 2682 of file Triangulation.h.

◆ setImplicitPreconditions()

void ttk::Triangulation::setImplicitPreconditions ( const STRATEGY  strategy)
inline

Set the input grid preconditioning strategy.

Parameters
[in]strategyStrategy to implement.

Definition at line 2857 of file Triangulation.h.

◆ setInputCells()

int ttk::Triangulation::setInputCells ( const SimplexId cellNumber,
const LongSimplexId cellArray 
)
inline

Set the input cells for the triangulation.

Here the notion of cell refers to the simplicices of maximal dimension (3D: tetrahedra, 2D: triangles, 1D: edges).

Parameters
cellNumberNumber of input cells.
cellArrayPointer to the input cells. This pointer should point to an array of long long int where cells are stored one after the other. In particular, each cell starts by the number of vertices in it, followed by the identifiers of its vertices. This corresponds to the default cell array representation in VTK < 9.
Returns
Returns 0 upon success, negative values otherwise.
Note
This function does not need to be called if the current object is a vtkTriangulation (this function is automatically called if needed through vtkTriangulation::setInputData()).
Warning
If this ttk::Triangulation object is already representing a valid triangulation, this information will be over-written (which means that preconditioning functions should be called again).

Definition at line 2759 of file Triangulation.h.

◆ setInputGrid()

int ttk::Triangulation::setInputGrid ( const float &  xOrigin,
const float &  yOrigin,
const float &  zOrigin,
const float &  xSpacing,
const float &  ySpacing,
const float &  zSpacing,
const SimplexId xDim,
const SimplexId yDim,
const SimplexId zDim 
)
inline

Set the specifications of the input grid to implicitly represent as a triangulation.

Parameters
xOriginInput x coordinate of the grid origin.
yOriginInput y coordinate of the grid origin.
zOriginInput z coordinate of the grid origin.
xSpacingInput spacing along the x dimension.
ySpacingInput spacing along the y dimension.
zSpacingInput spacing along the z dimension.
xDimInput number of vertices along the x dimension.
yDimInput number of vertices along the y dimension.
zDimInput number of vertices along the z dimension.
Returns
Returns 0 upon success, negative values otherwise.
Note
This function does not need to be called if the current object is a vtkTriangulation (this function is automatically called if needed through vtkTriangulation::setInputData()).
Warning
If this ttk::Triangulation object is already representing a valid triangulation, this information will be over-written (which means that preconditioning functions should be called again).

Definition at line 2795 of file Triangulation.h.

◆ setInputPoints()

int ttk::Triangulation::setInputPoints ( const SimplexId pointNumber,
const void *  pointSet,
const bool &  doublePrecision = false 
)
inline

Set the input 3D points of the triangulation.

Parameters
pointNumberNumber of input vertices.
pointSetPointer to the 3D points. This pointer should point to an array of float where points are stored one after the other. In particular, each point is represented by X-Y-Z coordinates (one after the other). This corresponds to the default point set representation in VTK.
doublePrecisionShould we use double precision or stay with simple?
Returns
Returns 0 upon success, negative values otherwise.
Note
This function does not need to be called if the current object is a vtkTriangulation (this function is automatically called if needed through vtkTriangulation::setInputData()).
Warning
If this ttk::Triangulation object is already representing a valid triangulation, this information will be over-written (which means that preconditioning functions should be called again).

Definition at line 2898 of file Triangulation.h.

◆ setPeriodicBoundaryConditions()

void ttk::Triangulation::setPeriodicBoundaryConditions ( const bool &  usePeriodicBoundaries)
inline

Set the input grid to use period boundary conditions.

Parameters
usePeriodicBoundariesIf this set to true then a triangulation with periodic boundaries will be used.

Definition at line 2833 of file Triangulation.h.

◆ setStellarInputCells()

int ttk::Triangulation::setStellarInputCells ( const SimplexId cellNumber,
const LongSimplexId cellArray 
)
inline

Definition at line 2766 of file Triangulation.h.

◆ setStellarInputPoints()

int ttk::Triangulation::setStellarInputPoints ( const SimplexId pointNumber,
const void *  pointSet,
const int *  indexArray,
const bool &  doublePrecision = false 
)
inline

Definition at line 2908 of file Triangulation.h.

◆ setThreadNumber()

int ttk::Triangulation::setThreadNumber ( const ThreadId  threadNumber)
inlineoverridevirtual

Tune the number of active threads (default: number of logical cores)

Reimplemented from ttk::BaseClass.

Definition at line 2920 of file Triangulation.h.

◆ setWrapper()

int ttk::Triangulation::setWrapper ( const Wrapper wrapper)
inlineoverridevirtual

Internal usage. Pass the execution context (debug level, number of threads, etc.) to the implementing classes.

Reimplemented from ttk::Debug.

Definition at line 2933 of file Triangulation.h.

◆ switchGrid()

void Triangulation::switchGrid ( const bool  usePeriodic,
const bool  usePreconditions 
)
protected

Switch regular grid triangulation type.

Parameters
[in]usePeriodicUse a periodic triangulation
[in]usePreconditionsPerform triangulation preconditions

Definition at line 158 of file Triangulation.cpp.

Member Data Documentation

◆ abstractTriangulation_

AbstractTriangulation* ttk::Triangulation::abstractTriangulation_
protected

Definition at line 3007 of file Triangulation.h.

◆ compactTriangulation_

CompactTriangulation ttk::Triangulation::compactTriangulation_
protected

Definition at line 3013 of file Triangulation.h.

◆ explicitTriangulation_

ExplicitTriangulation ttk::Triangulation::explicitTriangulation_
protected

Definition at line 3008 of file Triangulation.h.

◆ implicitPreconditionsTriangulation_

ImplicitWithPreconditions ttk::Triangulation::implicitPreconditionsTriangulation_
protected

Definition at line 3010 of file Triangulation.h.

◆ implicitTriangulation_

ImplicitNoPreconditions ttk::Triangulation::implicitTriangulation_
protected

Definition at line 3009 of file Triangulation.h.

◆ periodicImplicitTriangulation_

PeriodicNoPreconditions ttk::Triangulation::periodicImplicitTriangulation_
protected

Definition at line 3011 of file Triangulation.h.

◆ periodicPreconditionsTriangulation_

PeriodicWithPreconditions ttk::Triangulation::periodicPreconditionsTriangulation_
protected

Definition at line 3012 of file Triangulation.h.


The documentation for this class was generated from the following files: