TTK
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 , PERIODIC }
 

Public Member Functions

 Triangulation ()
 
 Triangulation (const Triangulation &)
 
 Triangulation (Triangulation &&) noexcept
 
Triangulationoperator= (const Triangulation &)
 
Triangulationoperator= (Triangulation &&) noexcept
 
 ~Triangulation ()
 
int clear ()
 
size_t footprint () const
 
int getCellEdge (const SimplexId &cellId, const int &localEdgeId, SimplexId &edgeId) const
 
SimplexId getCellEdgeNumber (const SimplexId &cellId) const
 
const std::vector< std::vector< SimplexId > > * getCellEdges ()
 
int getCellIncenter (SimplexId cellId, int dim, float incenter[3]) const
 
int getCellNeighbor (const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const
 
SimplexId getCellNeighborNumber (const SimplexId &cellId) const
 
const std::vector< std::vector< SimplexId > > * getCellNeighbors ()
 
int getCellTriangle (const SimplexId &cellId, const int &localTriangleId, SimplexId &triangleId) const
 
SimplexId getCellTriangleNumber (const SimplexId &cellId) const
 
const std::vector< std::vector< SimplexId > > * getCellTriangles ()
 
int getCellVertex (const SimplexId &cellId, const int &localVertexId, SimplexId &vertexId) const
 
SimplexId getCellVertexNumber (const SimplexId &cellId) const
 
int getDimensionality () const
 
const std::vector< std::array< SimplexId, 2 > > * getEdges ()
 
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
 
SimplexId getEdgeLinkNumber (const SimplexId &edgeId) const
 
const std::vector< std::vector< SimplexId > > * getEdgeLinks ()
 
int getEdgeStar (const SimplexId &edgeId, const int &localStarId, SimplexId &starId) const
 
SimplexId getEdgeStarNumber (const SimplexId &edgeId) const
 
const std::vector< std::vector< SimplexId > > * getEdgeStars ()
 
int getEdgeTriangle (const SimplexId &edgeId, const int &localTriangleId, SimplexId &triangleId) const
 
SimplexId getEdgeTriangleNumber (const SimplexId &edgeId) const
 
const std::vector< std::vector< SimplexId > > * getEdgeTriangles ()
 
int getEdgeVertex (const SimplexId &edgeId, const int &localVertexId, SimplexId &vertexId) const
 
AbstractTriangulationgetData ()
 
SimplexId getNumberOfCells () const
 
SimplexId getNumberOfEdges () const
 
SimplexId getNumberOfTriangles () const
 
SimplexId getNumberOfVertices () const
 
int getTetraIncenter (SimplexId tetraId, float incenter[3]) const
 
const std::vector< std::array< SimplexId, 3 > > * getTriangles ()
 
int getTriangleEdge (const SimplexId &triangleId, const int &localEdgeId, SimplexId &edgeId) const
 
SimplexId getTriangleEdgeNumber (const SimplexId &triangleId) const
 
const std::vector< std::vector< SimplexId > > * getTriangleEdges ()
 
int getTriangleLink (const SimplexId &triangleId, const int &localLinkId, SimplexId &linkId) const
 
SimplexId getTriangleLinkNumber (const SimplexId &triangleId) const
 
const std::vector< std::vector< SimplexId > > * getTriangleLinks ()
 
int getTriangleStar (const SimplexId &triangleId, const int &localStarId, SimplexId &starId) const
 
SimplexId getTriangleStarNumber (const SimplexId &triangleId) const
 
const std::vector< std::vector< SimplexId > > * getTriangleStars ()
 
int getTriangleVertex (const SimplexId &triangleId, const int &localVertexId, SimplexId &vertexId) const
 
Triangulation::Type getType () const
 
int getVertexEdge (const SimplexId &vertexId, const int &localEdgeId, SimplexId &edgeId) const
 
SimplexId getVertexEdgeNumber (const SimplexId &vertexId) const
 
const std::vector< std::vector< SimplexId > > * getVertexEdges ()
 
int getVertexLink (const SimplexId &vertexId, const int &localLinkId, SimplexId &linkId) const
 
SimplexId getVertexLinkNumber (const SimplexId &vertexId) const
 
const std::vector< std::vector< SimplexId > > * getVertexLinks ()
 
int getVertexNeighbor (const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const
 
SimplexId getVertexNeighborNumber (const SimplexId &vertexId) const
 
const std::vector< std::vector< SimplexId > > * getVertexNeighbors ()
 
int getVertexPoint (const SimplexId &vertexId, float &x, float &y, float &z) const
 
int getVertexStar (const SimplexId &vertexId, const int &localStarId, SimplexId &starId) const
 
SimplexId getVertexStarNumber (const SimplexId &vertexId) const
 
const std::vector< std::vector< SimplexId > > * getVertexStars ()
 
int getVertexTriangle (const SimplexId &vertexId, const int &localTriangleId, SimplexId &triangleId) const
 
SimplexId getVertexTriangleNumber (const SimplexId &vertexId) const
 
const std::vector< std::vector< SimplexId > > * getVertexTriangles ()
 
bool isEdgeOnBoundary (const SimplexId &edgeId) const
 
bool isEmpty () const
 
bool isTriangleOnBoundary (const SimplexId &triangleId) const
 
bool isVertexOnBoundary (const SimplexId &vertexId) const
 
int preconditionBoundaryEdges ()
 
int preconditionBoundaryTriangles ()
 
int preconditionBoundaryVertices ()
 
int preconditionCellEdges ()
 
int preconditionCellNeighbors ()
 
int preconditionCellTriangles ()
 
int preconditionEdges ()
 
int preconditionEdgeLinks ()
 
int preconditionEdgeStars ()
 
int preconditionEdgeTriangles ()
 
int preconditionTriangles ()
 
int preconditionTriangleEdges ()
 
int preconditionTriangleLinks ()
 
int preconditionTriangleStars ()
 
int preconditionVertexEdges ()
 
int preconditionVertexLinks ()
 
int preconditionVertexNeighbors ()
 
int preconditionVertexStars ()
 
int preconditionVertexTriangles ()
 
int setDebugLevel (const int &debugLevel)
 Tune the debug level (default: 0) More...
 
int setInputCells (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)
 
int setInputPoints (const SimplexId &pointNumber, const void *pointSet, const bool &doublePrecision=false)
 
int setThreadNumber (const ThreadId threadNumber)
 Tune the number of active threads (default: number of logical cores) More...
 
int setWrapper (const Wrapper *wrapper)
 
- Public Member Functions inherited from ttk::AbstractTriangulation
 AbstractTriangulation ()
 
virtual ~AbstractTriangulation ()
 
int clear ()
 
size_t footprint (size_t size=0) const
 
int getEdgeVertexNumber (const SimplexId ttkNotUsed(edgeId)) const
 
virtual int getGridDimensions (std::vector< int > &dimensions)
 
int getTriangleVertexNumber (const SimplexId ttkNotUsed(triangleId)) const
 
bool hasPeriodicBoundaries () const
 Returns true if the grid uses period boundary conditions. More...
 
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 ()
 
virtual ~Wrapper ()=default
 
virtual int updateProgress (const float &progress)=0
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
virtual ~Debug ()
 
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
 
virtual int setThreadNumber (const int threadNumber)
 

Protected Member Functions

bool isEmptyCheck () const
 
- 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 needsToAbort ()
 
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 ()
 
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))
 
- 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_
 
ImplicitTriangulation implicitTriangulation_
 
PeriodicImplicitTriangulation periodicImplicitTriangulation_
 
- 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_
 
std::array< int, 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_ {}
 
- Protected Attributes inherited from ttk::Wrapper
float processingProgress_
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- 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 pre-processing, 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 pre-processes, Triangulation requires no memory overhead in addition to the input data.

Note
Only pre-process the information you need! See the documentation further down.
See also
ttkTriangulation

Definition at line 48 of file Triangulation.h.

Member Enumeration Documentation

◆ Type

Enumerator
EXPLICIT 
IMPLICIT 
PERIODIC 

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 13 of file Triangulation.cpp.

◆ Triangulation() [3/3]

Triangulation::Triangulation ( Triangulation &&  rhs)
noexcept

Definition at line 31 of file Triangulation.cpp.

◆ ~Triangulation()

Triangulation::~Triangulation ( )
default

Member Function Documentation

◆ clear()

int ttk::Triangulation::clear ( void  )
inline

Reset the triangulation data-structures.

Returns
Returns 0 upon success, negative values otherwise.

Definition at line 62 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 73 of file Triangulation.h.

◆ getCellEdge()

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

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 pre-processing 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 103 of file Triangulation.h.

◆ getCellEdgeNumber()

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

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 pre-processing 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 134 of file Triangulation.h.

◆ getCellEdges()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getCellEdges ( )
inlinevirtual
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 pre-processing 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 170 of file Triangulation.h.

◆ getCellIncenter()

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

Definition at line 179 of file Triangulation.h.

◆ getCellNeighbor()

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

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 pre-processing 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 206 of file Triangulation.h.

◆ getCellNeighborNumber()

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

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 pre-processing 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 234 of file Triangulation.h.

◆ getCellNeighbors()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getCellNeighbors ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the cell neighbor list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 268 of file Triangulation.h.

◆ getCellTriangle()

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

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 pre-processing 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 298 of file Triangulation.h.

◆ getCellTriangleNumber()

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

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 pre-processing 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 330 of file Triangulation.h.

◆ getCellTriangles()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getCellTriangles ( )
inlinevirtual
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 pre-processing 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 369 of file Triangulation.h.

◆ getCellVertex()

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

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()].
vertexIdOuput global vertex identifier.
Returns
Returns 0 upon success, negative values otherwise.
See also
getCellVertexNumber()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 388 of file Triangulation.h.

◆ getCellVertexNumber()

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

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 410 of file Triangulation.h.

◆ getData()

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

Get the internal abstract triangulation object.

Returns
Returns a pointer to the internal abstract triangulation object.

Definition at line 804 of file Triangulation.h.

◆ getDimensionality()

int ttk::Triangulation::getDimensionality ( void  ) const
inlinevirtual

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 422 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 473 of file Triangulation.h.

◆ getEdgeLink()

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

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 pre-processing 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 520 of file Triangulation.h.

◆ getEdgeLinkNumber()

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

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 pre-processing 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 547 of file Triangulation.h.

◆ getEdgeLinks()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getEdgeLinks ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the edge link list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 578 of file Triangulation.h.

◆ getEdges()

const std::vector<std::array<SimplexId, 2> >* ttk::Triangulation::getEdges ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the edge list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 454 of file Triangulation.h.

◆ getEdgeStar()

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

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 pre-processing 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 608 of file Triangulation.h.

◆ getEdgeStarNumber()

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

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 pre-processing 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 638 of file Triangulation.h.

◆ getEdgeStars()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getEdgeStars ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the edge star list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 674 of file Triangulation.h.

◆ getEdgeTriangle()

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

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 pre-processing 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 701 of file Triangulation.h.

◆ getEdgeTriangleNumber()

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

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 pre-processing 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 730 of file Triangulation.h.

◆ getEdgeTriangles()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getEdgeTriangles ( )
inlinevirtual
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 pre-processing 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 763 of file Triangulation.h.

◆ getEdgeVertex()

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

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 pre-processing 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 788 of file Triangulation.h.

◆ getNumberOfCells()

SimplexId ttk::Triangulation::getNumberOfCells ( void  ) const
inlinevirtual

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 813 of file Triangulation.h.

◆ getNumberOfEdges()

SimplexId ttk::Triangulation::getNumberOfEdges ( void  ) const
inlinevirtual

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 pre-processing step from any time performance measurement.
Returns
Returns the number of edges.
See also
getNumberOfCells()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 836 of file Triangulation.h.

◆ getNumberOfTriangles()

SimplexId ttk::Triangulation::getNumberOfTriangles ( void  ) const
inlinevirtual

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 pre-processing step from any time performance measurement.
Returns
Returns the number of triangles.
See also
getNumberOfCells()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 857 of file Triangulation.h.

◆ getNumberOfVertices()

SimplexId ttk::Triangulation::getNumberOfVertices ( void  ) const
inlinevirtual

Get the number of vertices in the triangulation.

Returns
Returns the number of vertices.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 868 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
tetIdInput global tet identifier.
incenterOutput barycenter.
Returns
Returns 0 upon success, negative values otherwise.
See also
getTriangleIncenter()
getEdgeIncenter()

Definition at line 883 of file Triangulation.h.

◆ getTriangleEdge()

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

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 pre-processing 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 941 of file Triangulation.h.

◆ getTriangleEdgeNumber()

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

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 pre-processing 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 969 of file Triangulation.h.

◆ getTriangleEdges()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getTriangleEdges ( )
inlinevirtual
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 pre-processing 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 1002 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 492 of file Triangulation.h.

◆ getTriangleLink()

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

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 pre-processing 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 1029 of file Triangulation.h.

◆ getTriangleLinkNumber()

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

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 pre-processing 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 1058 of file Triangulation.h.

◆ getTriangleLinks()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getTriangleLinks ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the triangle link list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1090 of file Triangulation.h.

◆ getTriangles()

const std::vector<std::array<SimplexId, 3> >* ttk::Triangulation::getTriangles ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the triangle list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 915 of file Triangulation.h.

◆ getTriangleStar()

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

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 pre-processing 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 1118 of file Triangulation.h.

◆ getTriangleStarNumber()

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

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 pre-processing 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 1146 of file Triangulation.h.

◆ getTriangleStars()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getTriangleStars ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the triangle star list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1179 of file Triangulation.h.

◆ getTriangleVertex()

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

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 pre-processing 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 1204 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 1224 of file Triangulation.h.

◆ getVertexEdge()

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

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 pre-processing 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 1253 of file Triangulation.h.

◆ getVertexEdgeNumber()

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

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 pre-processing 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 1282 of file Triangulation.h.

◆ getVertexEdges()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getVertexEdges ( )
inlinevirtual
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 pre-processing 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 1316 of file Triangulation.h.

◆ getVertexLink()

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

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 pre-processing 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 1346 of file Triangulation.h.

◆ getVertexLinkNumber()

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

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 pre-processing 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 1375 of file Triangulation.h.

◆ getVertexLinks()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getVertexLinks ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the vertex link list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1408 of file Triangulation.h.

◆ getVertexNeighbor()

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

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 pre-processing 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 1433 of file Triangulation.h.

◆ getVertexNeighborNumber()

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

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 pre-processing step from any time performance measurement.
Parameters
vertexIdInput global vertex identifier.
Returns
Returns the number vertex neighbors.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1459 of file Triangulation.h.

◆ getVertexNeighbors()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getVertexNeighbors ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the vertex neighbor list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1491 of file Triangulation.h.

◆ getVertexPoint()

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

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 1505 of file Triangulation.h.

◆ getVertexStar()

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

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 pre-processing 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 1542 of file Triangulation.h.

◆ getVertexStarNumber()

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

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 pre-processing 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 1571 of file Triangulation.h.

◆ getVertexStars()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getVertexStars ( )
inlinevirtual
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 pre-processing step from any time performance measurement.
Returns
Returns a pointer to the vertex star list.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1604 of file Triangulation.h.

◆ getVertexTriangle()

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

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 pre-processing 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 1632 of file Triangulation.h.

◆ getVertexTriangleNumber()

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

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 pre-processing 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 1661 of file Triangulation.h.

◆ getVertexTriangles()

const std::vector<std::vector<SimplexId> >* ttk::Triangulation::getVertexTriangles ( )
inlinevirtual
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 pre-processing 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 1695 of file Triangulation.h.

◆ isEdgeOnBoundary()

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

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 pre-processing 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 1723 of file Triangulation.h.

◆ isEmpty()

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

Check if the data structure is empty or not.

Returns
Returns true if empty, false otherwise.

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1733 of file Triangulation.h.

◆ isEmptyCheck()

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

Definition at line 2460 of file Triangulation.h.

◆ isTriangleOnBoundary()

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

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 pre-processing 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 1757 of file Triangulation.h.

◆ isVertexOnBoundary()

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

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 pre-processing 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 1782 of file Triangulation.h.

◆ operator=() [1/2]

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

Definition at line 50 of file Triangulation.cpp.

◆ operator=() [2/2]

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

Definition at line 72 of file Triangulation.cpp.

◆ preconditionBoundaryEdges()

int ttk::Triangulation::preconditionBoundaryEdges ( )
inlinevirtual

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 pre-processing function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
isEdgeOnBoundary()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1803 of file Triangulation.h.

◆ preconditionBoundaryTriangles()

int ttk::Triangulation::preconditionBoundaryTriangles ( )
inlinevirtual

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 pre-processing function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
isTriangleOnBoundary()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1824 of file Triangulation.h.

◆ preconditionBoundaryVertices()

int ttk::Triangulation::preconditionBoundaryVertices ( )
inlinevirtual

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 pre-processing function from any time performance measurement.
Returns
Returns 0 upon success, negative values otherwise.
See also
isVertexOnBoundary()

Reimplemented from ttk::AbstractTriangulation.

Definition at line 1846 of file Triangulation.h.

◆ preconditionCellEdges()

int ttk::Triangulation::preconditionCellEdges ( )
inlinevirtual

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 pre-processing 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 1869 of file Triangulation.h.

◆ preconditionCellNeighbors()

int ttk::Triangulation::preconditionCellNeighbors ( )
inlinevirtual

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 pre-processing 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 1895 of file Triangulation.h.

◆ preconditionCellTriangles()

int ttk::Triangulation::preconditionCellTriangles ( )
inlinevirtual

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 pre-processing 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 1921 of file Triangulation.h.

◆ preconditionEdgeLinks()

int ttk::Triangulation::preconditionEdgeLinks ( )
inlinevirtual

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 pre-processing 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 1974 of file Triangulation.h.

◆ preconditionEdges()

int ttk::Triangulation::preconditionEdges ( )
inlinevirtual

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 pre-processing 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 1947 of file Triangulation.h.

◆ preconditionEdgeStars()

int ttk::Triangulation::preconditionEdgeStars ( )
inlinevirtual

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 pre-processing 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 2000 of file Triangulation.h.

◆ preconditionEdgeTriangles()

int ttk::Triangulation::preconditionEdgeTriangles ( )
inlinevirtual

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 pre-processing 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 2026 of file Triangulation.h.

◆ preconditionTriangleEdges()

int ttk::Triangulation::preconditionTriangleEdges ( )
inlinevirtual

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 pre-processing 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 2079 of file Triangulation.h.

◆ preconditionTriangleLinks()

int ttk::Triangulation::preconditionTriangleLinks ( )
inlinevirtual

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 pre-processing 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 2105 of file Triangulation.h.

◆ preconditionTriangles()

int ttk::Triangulation::preconditionTriangles ( )
inlinevirtual

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 pre-processing 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 2053 of file Triangulation.h.

◆ preconditionTriangleStars()

int ttk::Triangulation::preconditionTriangleStars ( )
inlinevirtual

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 pre-processing 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 2131 of file Triangulation.h.

◆ preconditionVertexEdges()

int ttk::Triangulation::preconditionVertexEdges ( )
inlinevirtual

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 pre-processing 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 2158 of file Triangulation.h.

◆ preconditionVertexLinks()

int ttk::Triangulation::preconditionVertexLinks ( )
inlinevirtual

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 pre-processing 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 2185 of file Triangulation.h.

◆ preconditionVertexNeighbors()

int ttk::Triangulation::preconditionVertexNeighbors ( )
inlinevirtual

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 pre-processing 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 2212 of file Triangulation.h.

◆ preconditionVertexStars()

int ttk::Triangulation::preconditionVertexStars ( )
inlinevirtual

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 pre-processing 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 2238 of file Triangulation.h.

◆ preconditionVertexTriangles()

int ttk::Triangulation::preconditionVertexTriangles ( )
inlinevirtual

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 pre-processing 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 2265 of file Triangulation.h.

◆ setDebugLevel()

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

Tune the debug level (default: 0)

Reimplemented from ttk::Debug.

Definition at line 2275 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 pre-processing functions should be called again).

Definition at line 2332 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 pre-processing functions should be called again).

Definition at line 2359 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.
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 pre-processing functions should be called again).

Definition at line 2431 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 2395 of file Triangulation.h.

◆ setThreadNumber()

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

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

Definition at line 2442 of file Triangulation.h.

◆ setWrapper()

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

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

Reimplemented from ttk::Debug.

Definition at line 2452 of file Triangulation.h.

Member Data Documentation

◆ abstractTriangulation_

AbstractTriangulation* ttk::Triangulation::abstractTriangulation_
protected

Definition at line 2468 of file Triangulation.h.

◆ explicitTriangulation_

ExplicitTriangulation ttk::Triangulation::explicitTriangulation_
protected

Definition at line 2469 of file Triangulation.h.

◆ implicitTriangulation_

ImplicitTriangulation ttk::Triangulation::implicitTriangulation_
protected

Definition at line 2470 of file Triangulation.h.

◆ periodicImplicitTriangulation_

PeriodicImplicitTriangulation ttk::Triangulation::periodicImplicitTriangulation_
protected

Definition at line 2471 of file Triangulation.h.


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