TTK
Loading...
Searching...
No Matches
DiscreteGradient Class Reference

TTK discreteGradient processing package. More...

#include <DiscreteGradient.h>

Inheritance diagram for DiscreteGradient:
ttk::Debug ttk::BaseClass ttkDiscreteGradient

Public Types

enum class  BACKEND { CLASSIC_BACKEND = 0 , STOCHASTIC_BACKEND = 1 }
 

Public Member Functions

 DiscreteGradient ()
 
template<typename dataType, typename triangulationType>
int buildGradient (const triangulationType &triangulation, bool bypassCache=false, const std::vector< bool > *updateMask=nullptr)
 
template<typename triangulationType>
int buildGradient (const triangulationType &triangulation, bool bypassCache=false, const std::vector< bool > *updateMask=nullptr)
 
void setInputScalarField (const void *const data, const size_t mTime)
 
void setBackend (const BACKEND newBackend)
 
void setSeed (const unsigned int &newSeed)
 
void setReturnSaddleConnectors (const bool &returnSaddleConnectors)
 
bool newParameters ()
 
void setSaddleConnectorsPersistenceThreshold (double threshold)
 
void preconditionTriangulation (AbstractTriangulation *const data)
 
void setLocalGradient ()
 Use local storage instead of cache.
 
void setInputOffsets (const SimplexId *const data)
 
int getDimensionality () const
 
int getNumberOfDimensions () const
 
template<typename triangulationType>
SimplexId getNumberOfCells (const int dimension, const triangulationType &triangulation) const
 
template<typename triangulationType>
bool isBoundary (const Cell &cell, const triangulationType &triangulation) const
 
bool isCellCritical (const int cellDim, const SimplexId cellId) const
 
bool isCellCritical (const Cell &cell) const
 
template<typename triangulationType>
SimplexId getPairedCell (const Cell &cell, const triangulationType &triangulation, bool isReverse=false) const
 
template<typename triangulationType>
int getAscendingPath (const Cell &cell, std::vector< Cell > &vpath, const triangulationType &triangulation, const bool enableCycleDetector=false) const
 
template<typename triangulationType>
int getDescendingPath (const Cell &cell, std::vector< Cell > &vpath, const triangulationType &triangulation) const
 
template<typename triangulationType>
bool getDescendingPathThroughWall (const Cell &saddle2, const Cell &saddle1, const std::vector< bool > &isVisited, std::vector< Cell > *const vpath, const triangulationType &triangulation, const bool stopIfMultiConnected=false, const bool enableCycleDetector=false) const
 
template<typename triangulationType>
bool getAscendingPathThroughWall (const Cell &saddle1, const Cell &saddle2, const std::vector< bool > &isVisited, std::vector< Cell > *const vpath, const triangulationType &triangulation, const bool stopIfMultiConnected=false, const bool enableCycleDetector=false, bool *const cycleFound=nullptr) const
 
template<typename triangulationType>
bool detectGradientCycle (const Cell &cell, const triangulationType &triangulation) const
 
template<typename triangulationType>
int getDescendingWall (const Cell &cell, VisitedMask &mask, const triangulationType &triangulation, std::vector< Cell > *const wall=nullptr, std::vector< SimplexId > *const saddles=nullptr) const
 
template<typename triangulationType>
int getAscendingWall (const Cell &cell, VisitedMask &mask, const triangulationType &triangulation, std::vector< Cell > *const wall=nullptr, std::vector< SimplexId > *const saddles=nullptr) const
 
template<typename triangulationType>
SimplexId getCellGreaterVertex (const Cell c, const triangulationType &triangulation) const
 
template<typename triangulationType>
ttk::SimplexId getCellGreaterVertex (const Cell c, const triangulationType &triangulation) const
 
template<typename triangulationType>
SimplexId getCellLowerVertex (const Cell c, const triangulationType &triangulation) const
 
template<typename triangulationType>
ttk::SimplexId getCellLowerVertex (const Cell c, const triangulationType &triangulation) const
 
template<typename triangulationType>
int setCriticalPoints (const std::array< std::vector< SimplexId >, 4 > &criticalCellsByDim, std::vector< std::array< float, 3 > > &points, std::vector< char > &cellDimensions, std::vector< SimplexId > &cellIds, std::vector< char > &isOnBoundary, std::vector< SimplexId > &PLVertexIdentifiers, const triangulationType &triangulation) const
 
template<typename triangulationType>
int setCriticalPoints (std::vector< std::array< float, 3 > > &points, std::vector< char > &cellDimensions, std::vector< SimplexId > &cellIds, std::vector< char > &isOnBoundary, std::vector< SimplexId > &PLVertexIdentifiers, const triangulationType &triangulation) const
 
template<typename triangulationType>
int getCriticalPoints (std::array< std::vector< SimplexId >, 4 > &criticalCellsByDim, const triangulationType &triangulation) const
 
template<typename triangulationType>
int getCriticalPoints (std::vector< Cell > &criticalPoints, const triangulationType &triangulation) const
 
int setManifoldSize (const std::array< std::vector< SimplexId >, 4 > &criticalCellsByDim, const SimplexId *const ascendingManifold, const SimplexId *const descendingManifold, std::vector< SimplexId > &manifoldSize) const
 
template<typename triangulationType>
int setGradientGlyphs (std::vector< std::array< float, 3 > > &points, std::vector< char > &points_pairOrigins, std::vector< char > &cells_pairTypes, std::vector< SimplexId > &cellsIds, std::vector< char > &cellsDimensions, const triangulationType &triangulation) const
 
CriticalType criticalTypeFromCellDimension (const int dim) const
 Return the critical type corresponding to given dimension.
 
template<typename dataType, typename triangulationType>
dataType getPersistence (const Cell &up, const Cell &down, const dataType *const scalars, const triangulationType &triangulation) const
 
bool isMinimum (const Cell &cell) const
 
bool isSaddle1 (const Cell &cell) const
 
bool isSaddle2 (const Cell &cell) const
 
bool isMaximum (const Cell &cell) const
 
template<typename triangulationType>
int reverseAscendingPath (const std::vector< Cell > &vpath, const triangulationType &triangulation) const
 
template<typename triangulationType>
int reverseDescendingPath (const std::vector< Cell > &vpath, const triangulationType &triangulation) const
 
template<typename triangulationType>
int reverseAscendingPathOnWall (const std::vector< Cell > &vpath, const triangulationType &triangulation, bool cancelReversal=false) const
 
template<typename triangulationType>
int reverseDescendingPathOnWall (const std::vector< Cell > &vpath, const triangulationType &triangulation) const
 
int getCriticalPointMap (const std::vector< std::pair< SimplexId, char > > &criticalPoints, std::vector< char > &isPL)
 
template<typename dataType, typename triangulationType>
int simplifySaddleSaddleConnections1 (const std::vector< std::pair< SimplexId, char > > &criticalPoints, const std::vector< char > &isPL, const int iterationThreshold, const bool allowBoundary, const bool allowBruteForce, const bool returnSaddleConnectors, const triangulationType &triangulation)
 
template<typename dataType, typename triangulationType>
int simplifySaddleSaddleConnections2 (const std::vector< std::pair< SimplexId, char > > &criticalPoints, const std::vector< char > &isPL, const int iterationThreshold, const bool allowBoundary, const bool allowBruteForce, const bool returnSaddleConnectors, const triangulationType &triangulation)
 
template<typename dataType, typename triangulationType>
int filterSaddleConnectors (const bool allowBoundary, const triangulationType &triangulation)
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Static Public Member Functions

static void clearCache (const AbstractTriangulation &triangulation)
 

Protected Attributes

int dimensionality_ {-1}
 
int IterationThreshold {50}
 
double SaddleConnectorsPersistenceThreshold {}
 
SimplexId numberOfVertices_ {}
 
BACKEND BackEnd {BACKEND::CLASSIC_BACKEND}
 
BACKEND OldBackEnd {BACKEND::CLASSIC_BACKEND}
 
unsigned int Seed {}
 
unsigned int OldSeed {}
 
bool ReturnSaddleConnectors {}
 
bool OldReturnSaddleConnectors {}
 
AbstractTriangulation::gradientType localGradient_ {}
 
AbstractTriangulation::gradientKeyType inputScalarField_ {}
 
AbstractTriangulation::gradientType * gradient_ {}
 
const SimplexIdinputOffsets_ {}
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Protected 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)
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

TTK discreteGradient processing package.

Compute and manage a discrete gradient of a function on a triangulation. TTK assumes that the input dataset is made of only one connected component.

Author
Guillaume Favelier guill.nosp@m.aume.nosp@m..fave.nosp@m.lier.nosp@m.@lip6.nosp@m..fr
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Pierre Guillou pierr.nosp@m.e.gu.nosp@m.illou.nosp@m.@lip.nosp@m.6.fr
Yizhe Wang wangy.nosp@m.izhe.nosp@m.3518@.nosp@m.gmai.nosp@m.l.com
Date
November 2016.

DiscreteGradient is a TTK processing package that handles discrete gradient (in the sense of Discrete Morse Theory).

See also
ttk::Triangulation
Author
Guillaume Favelier guill.nosp@m.aume.nosp@m..fave.nosp@m.lier.nosp@m.@lip6.nosp@m..fr
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Pierre Guillou pierr.nosp@m.e.gu.nosp@m.illou.nosp@m.@lip.nosp@m.6.fr
Date
November 2016.

DiscreteGradient is a TTK processing package that handles discrete gradient (in the sense of Discrete Morse Theory).

See also
ttk::Triangulation

Definition at line 251 of file DiscreteGradient.h.

Member Enumeration Documentation

◆ BACKEND

Enumerator
CLASSIC_BACKEND 
STOCHASTIC_BACKEND 

Definition at line 254 of file DiscreteGradient.h.

Constructor & Destructor Documentation

◆ DiscreteGradient()

ttk::dcg::DiscreteGradient::DiscreteGradient ( )
inline

Definition at line 259 of file DiscreteGradient.h.

Member Function Documentation

◆ buildGradient() [1/2]

template<typename dataType, typename triangulationType>
int DiscreteGradient::buildGradient ( const triangulationType & triangulation,
bool bypassCache = false,
const std::vector< bool > * updateMask = nullptr )
     Compute the initial gradient field of the input scalar function on the

triangulation.

Definition at line 46 of file DiscreteGradient_Template.h.

◆ buildGradient() [2/2]

template<typename triangulationType>
int DiscreteGradient::buildGradient ( const triangulationType & triangulation,
bool bypassCache = false,
const std::vector< bool > * updateMask = nullptr )

Definition at line 37 of file DiscreteGradient_Template.h.

◆ clearCache()

static void ttk::dcg::DiscreteGradient::clearCache ( const AbstractTriangulation & triangulation)
inlinestatic

Definition at line 356 of file DiscreteGradient.h.

◆ criticalTypeFromCellDimension()

CriticalType DiscreteGradient::criticalTypeFromCellDimension ( const int dim) const

Return the critical type corresponding to given dimension.

Definition at line 118 of file DiscreteGradient.cpp.

◆ detectGradientCycle()

template<typename triangulationType>
bool DiscreteGradient::detectGradientCycle ( const Cell & cell,
const triangulationType & triangulation ) const

Detect the presence of a cycle on a edge-triangle path starting from an edge.

Definition at line 1908 of file DiscreteGradient_Template.h.

◆ filterSaddleConnectors()

template<typename dataType, typename triangulationType>
int DiscreteGradient::filterSaddleConnectors ( const bool allowBoundary,
const triangulationType & triangulation )

Definition at line 2590 of file DiscreteGradient_Template.h.

◆ getAscendingPath()

template<typename triangulationType>
int DiscreteGradient::getAscendingPath ( const Cell & cell,
std::vector< Cell > & vpath,
const triangulationType & triangulation,
const bool enableCycleDetector = false ) const

Return the VPath coming from the given cell.

Definition at line 1663 of file DiscreteGradient_Template.h.

◆ getAscendingPathThroughWall()

template<typename triangulationType>
bool DiscreteGradient::getAscendingPathThroughWall ( const Cell & saddle1,
const Cell & saddle2,
const std::vector< bool > & isVisited,
std::vector< Cell > *const vpath,
const triangulationType & triangulation,
const bool stopIfMultiConnected = false,
const bool enableCycleDetector = false,
bool *const cycleFound = nullptr ) const
     Return the VPath coming from the given 1-saddle restricted to the

2-separatrice of the 2-saddle.

Definition at line 1790 of file DiscreteGradient_Template.h.

◆ getAscendingWall()

template<typename triangulationType>
int DiscreteGradient::getAscendingWall ( const Cell & cell,
VisitedMask & mask,
const triangulationType & triangulation,
std::vector< Cell > *const wall = nullptr,
std::vector< SimplexId > *const saddles = nullptr ) const

Return the 2-separatrice coming from the given 1-saddle.

Definition at line 2012 of file DiscreteGradient_Template.h.

◆ getCellGreaterVertex() [1/2]

template<typename triangulationType>
SimplexId ttk::dcg::DiscreteGradient::getCellGreaterVertex ( const Cell c,
const triangulationType & triangulation ) const

Get the vertex id of with the maximum scalar field value on the given cell.

◆ getCellGreaterVertex() [2/2]

template<typename triangulationType>
ttk::SimplexId ttk::dcg::DiscreteGradient::getCellGreaterVertex ( const Cell c,
const triangulationType & triangulation ) const

Definition at line 2278 of file DiscreteGradient_Template.h.

◆ getCellLowerVertex() [1/2]

template<typename triangulationType>
SimplexId ttk::dcg::DiscreteGradient::getCellLowerVertex ( const Cell c,
const triangulationType & triangulation ) const

Get the vertex id of with the minimum scalar field value on the given cell.

◆ getCellLowerVertex() [2/2]

template<typename triangulationType>
ttk::SimplexId ttk::dcg::DiscreteGradient::getCellLowerVertex ( const Cell c,
const triangulationType & triangulation ) const

Definition at line 2341 of file DiscreteGradient_Template.h.

◆ getCriticalPointMap()

int DiscreteGradient::getCriticalPointMap ( const std::vector< std::pair< SimplexId, char > > & criticalPoints,
std::vector< char > & isPL )

Build the dense representation of the PL critical point list.

Definition at line 290 of file DiscreteGradient.cpp.

◆ getCriticalPoints() [1/2]

template<typename triangulationType>
int DiscreteGradient::getCriticalPoints ( std::array< std::vector< SimplexId >, 4 > & criticalCellsByDim,
const triangulationType & triangulation ) const

Get the output critical points as a STL vector of cells.

Definition at line 201 of file DiscreteGradient_Template.h.

◆ getCriticalPoints() [2/2]

template<typename triangulationType>
int DiscreteGradient::getCriticalPoints ( std::vector< Cell > & criticalPoints,
const triangulationType & triangulation ) const

Get the output critical points as a STL vector of cells.

Definition at line 246 of file DiscreteGradient_Template.h.

◆ getDescendingPath()

template<typename triangulationType>
int DiscreteGradient::getDescendingPath ( const Cell & cell,
std::vector< Cell > & vpath,
const triangulationType & triangulation ) const

Return the VPath terminating at the given cell.

Definition at line 1505 of file DiscreteGradient_Template.h.

◆ getDescendingPathThroughWall()

template<typename triangulationType>
bool DiscreteGradient::getDescendingPathThroughWall ( const Cell & saddle2,
const Cell & saddle1,
const std::vector< bool > & isVisited,
std::vector< Cell > *const vpath,
const triangulationType & triangulation,
const bool stopIfMultiConnected = false,
const bool enableCycleDetector = false ) const
     Return the VPath terminating at the given 2-saddle restricted to the

2-separatrice of the 1-saddle.

Definition at line 1557 of file DiscreteGradient_Template.h.

◆ getDescendingWall()

template<typename triangulationType>
int DiscreteGradient::getDescendingWall ( const Cell & cell,
VisitedMask & mask,
const triangulationType & triangulation,
std::vector< Cell > *const wall = nullptr,
std::vector< SimplexId > *const saddles = nullptr ) const

Return the 2-separatrice terminating at the given 2-saddle.

Definition at line 1949 of file DiscreteGradient_Template.h.

◆ getDimensionality()

int DiscreteGradient::getDimensionality ( ) const

Get the dimensionality of the triangulation.

Definition at line 7 of file DiscreteGradient.cpp.

◆ getNumberOfCells()

template<typename triangulationType>
SimplexId DiscreteGradient::getNumberOfCells ( const int dimension,
const triangulationType & triangulation ) const

Get the number of cells of the given dimension.

Definition at line 269 of file DiscreteGradient_Template.h.

◆ getNumberOfDimensions()

int DiscreteGradient::getNumberOfDimensions ( ) const
     Get the number of dimensions available for the cells in the

triangulation (equal to dimensionality+1).

Definition at line 11 of file DiscreteGradient.cpp.

◆ getPairedCell()

template<typename triangulationType>
SimplexId DiscreteGradient::getPairedCell ( const Cell & cell,
const triangulationType & triangulation,
bool isReverse = false ) const
     Return the identifier of the cell paired to the cell given by the

user in the gradient.

Definition at line 1411 of file DiscreteGradient_Template.h.

◆ getPersistence()

template<typename dataType, typename triangulationType>
dataType DiscreteGradient::getPersistence ( const Cell & up,
const Cell & down,
const dataType *const scalars,
const triangulationType & triangulation ) const

Compute the difference of function values of a pair of cells.

Definition at line 26 of file DiscreteGradient_Template.h.

◆ isBoundary()

template<typename triangulationType>
bool DiscreteGradient::isBoundary ( const Cell & cell,
const triangulationType & triangulation ) const

Return true if the given cell is at boundary, false otherwise.

Definition at line 1398 of file DiscreteGradient_Template.h.

◆ isCellCritical() [1/2]

bool DiscreteGradient::isCellCritical ( const Cell & cell) const

Definition at line 204 of file DiscreteGradient.cpp.

◆ isCellCritical() [2/2]

bool DiscreteGradient::isCellCritical ( const int cellDim,
const SimplexId cellId ) const
     Return true if the given cell is a critical point regarding the

discrete gradient, false otherwise.

Definition at line 174 of file DiscreteGradient.cpp.

◆ isMaximum()

bool DiscreteGradient::isMaximum ( const Cell & cell) const
     Return true if the given cell is a maximum regarding the discrete

gradient, false otherwise.

Definition at line 158 of file DiscreteGradient.cpp.

◆ isMinimum()

bool DiscreteGradient::isMinimum ( const Cell & cell) const
     Return true if the given cell is a minimum regarding the discrete

gradient, false otherwise.

Definition at line 132 of file DiscreteGradient.cpp.

◆ isSaddle1()

bool DiscreteGradient::isSaddle1 ( const Cell & cell) const
     Return true if the given cell is a 1-saddle regarding the discrete

gradient, false otherwise.

Definition at line 140 of file DiscreteGradient.cpp.

◆ isSaddle2()

bool DiscreteGradient::isSaddle2 ( const Cell & cell) const
     Return true if the given cell is a 2-saddle regarding the discrete

gradient, false otherwise.

Definition at line 149 of file DiscreteGradient.cpp.

◆ newParameters()

bool ttk::dcg::DiscreteGradient::newParameters ( )
inline

Definition at line 315 of file DiscreteGradient.h.

◆ preconditionTriangulation()

void ttk::dcg::DiscreteGradient::preconditionTriangulation ( AbstractTriangulation *const data)
inline

Preprocess all the required connectivity requests on the triangulation.

Definition at line 328 of file DiscreteGradient.h.

◆ reverseAscendingPath()

template<typename triangulationType>
int DiscreteGradient::reverseAscendingPath ( const std::vector< Cell > & vpath,
const triangulationType & triangulation ) const

Reverse the given ascending VPath.

Definition at line 2077 of file DiscreteGradient_Template.h.

◆ reverseAscendingPathOnWall()

template<typename triangulationType>
int DiscreteGradient::reverseAscendingPathOnWall ( const std::vector< Cell > & vpath,
const triangulationType & triangulation,
bool cancelReversal = false ) const

Reverse the given ascending VPath restricted on a 2-separatrice.

Definition at line 2185 of file DiscreteGradient_Template.h.

◆ reverseDescendingPath()

template<typename triangulationType>
int DiscreteGradient::reverseDescendingPath ( const std::vector< Cell > & vpath,
const triangulationType & triangulation ) const

Reverse the given descending VPath.

Definition at line 2146 of file DiscreteGradient_Template.h.

◆ reverseDescendingPathOnWall()

template<typename triangulationType>
int DiscreteGradient::reverseDescendingPathOnWall ( const std::vector< Cell > & vpath,
const triangulationType & triangulation ) const

Reverse the given descending VPath restricted on a 2-separatrice.

Definition at line 2238 of file DiscreteGradient_Template.h.

◆ setBackend()

void ttk::dcg::DiscreteGradient::setBackend ( const BACKEND newBackend)
inline

Definition at line 299 of file DiscreteGradient.h.

◆ setCriticalPoints() [1/2]

template<typename triangulationType>
int DiscreteGradient::setCriticalPoints ( const std::array< std::vector< SimplexId >, 4 > & criticalCellsByDim,
std::vector< std::array< float, 3 > > & points,
std::vector< char > & cellDimensions,
std::vector< SimplexId > & cellIds,
std::vector< char > & isOnBoundary,
std::vector< SimplexId > & PLVertexIdentifiers,
const triangulationType & triangulation ) const

Build the geometric embedding of the given STL vector of cells. The output vectors are modified accordingly. This function needs the following internal pointers to be set: outputCriticalPoints_numberOfPoints_ outputCriticalPoints_points_ inputScalarField_

Definition at line 126 of file DiscreteGradient_Template.h.

◆ setCriticalPoints() [2/2]

template<typename triangulationType>
int DiscreteGradient::setCriticalPoints ( std::vector< std::array< float, 3 > > & points,
std::vector< char > & cellDimensions,
std::vector< SimplexId > & cellIds,
std::vector< char > & isOnBoundary,
std::vector< SimplexId > & PLVertexIdentifiers,
const triangulationType & triangulation ) const

Detect the critical points and build their geometric embedding. The output vectors are modified accordingly.

Definition at line 184 of file DiscreteGradient_Template.h.

◆ setGradientGlyphs()

template<typename triangulationType>
int DiscreteGradient::setGradientGlyphs ( std::vector< std::array< float, 3 > > & points,
std::vector< char > & points_pairOrigins,
std::vector< char > & cells_pairTypes,
std::vector< SimplexId > & cellsIds,
std::vector< char > & cellsDimensions,
const triangulationType & triangulation ) const

Build the glyphs representing the discrete gradient vector field.

Definition at line 2404 of file DiscreteGradient_Template.h.

◆ setInputOffsets()

void ttk::dcg::DiscreteGradient::setInputOffsets ( const SimplexId *const data)
inline

Set the input offset function.

Precondition
For this function to behave correctly in the absence of the VTK wrapper, ttk::preconditionOrderArray() needs to be called to fill the data buffer prior to any computation (the VTK wrapper already includes a mechanism to automatically generate such a preconditioned buffer).
See also
examples/c++/main.cpp for an example use.

Definition at line 377 of file DiscreteGradient.h.

◆ setInputScalarField()

void ttk::dcg::DiscreteGradient::setInputScalarField ( const void *const data,
const size_t mTime )
inline

Set the input scalar function.

The first parameter is a pointer to the scalar field buffer (often provided by ttkUtils::GetVoidPointer()), the second one is a timestamp representing the last modification time of the scalar field (often provided by vtkObject::GetMTime()).

Definition at line 294 of file DiscreteGradient.h.

◆ setLocalGradient()

void ttk::dcg::DiscreteGradient::setLocalGradient ( )
inline

Use local storage instead of cache.

Definition at line 363 of file DiscreteGradient.h.

◆ setManifoldSize()

int DiscreteGradient::setManifoldSize ( const std::array< std::vector< SimplexId >, 4 > & criticalCellsByDim,
const SimplexId *const ascendingManifold,
const SimplexId *const descendingManifold,
std::vector< SimplexId > & manifoldSize ) const

Compute manifold size for critical extrema

Definition at line 208 of file DiscreteGradient.cpp.

◆ setReturnSaddleConnectors()

void ttk::dcg::DiscreteGradient::setReturnSaddleConnectors ( const bool & returnSaddleConnectors)
inline

Definition at line 310 of file DiscreteGradient.h.

◆ setSaddleConnectorsPersistenceThreshold()

void ttk::dcg::DiscreteGradient::setSaddleConnectorsPersistenceThreshold ( double threshold)
inline

Definition at line 320 of file DiscreteGradient.h.

◆ setSeed()

void ttk::dcg::DiscreteGradient::setSeed ( const unsigned int & newSeed)
inline

Definition at line 304 of file DiscreteGradient.h.

◆ simplifySaddleSaddleConnections1()

template<typename dataType, typename triangulationType>
int DiscreteGradient::simplifySaddleSaddleConnections1 ( const std::vector< std::pair< SimplexId, char > > & criticalPoints,
const std::vector< char > & isPL,
const int iterationThreshold,
const bool allowBoundary,
const bool allowBruteForce,
const bool returnSaddleConnectors,
const triangulationType & triangulation )

High-level function that manages the global simplification of (2-saddle,...,1-saddle) vpaths.

Definition at line 2484 of file DiscreteGradient_Template.h.

◆ simplifySaddleSaddleConnections2()

template<typename dataType, typename triangulationType>
int DiscreteGradient::simplifySaddleSaddleConnections2 ( const std::vector< std::pair< SimplexId, char > > & criticalPoints,
const std::vector< char > & isPL,
const int iterationThreshold,
const bool allowBoundary,
const bool allowBruteForce,
const bool returnSaddleConnectors,
const triangulationType & triangulation )

High-level function that manages the global simplification of (1-saddle,...,2-saddle) vpaths.

Definition at line 2537 of file DiscreteGradient_Template.h.

Member Data Documentation

◆ BackEnd

BACKEND ttk::dcg::DiscreteGradient::BackEnd {BACKEND::CLASSIC_BACKEND}
protected

Definition at line 942 of file DiscreteGradient.h.

◆ dimensionality_

int ttk::dcg::DiscreteGradient::dimensionality_ {-1}
protected

Definition at line 938 of file DiscreteGradient.h.

◆ gradient_

AbstractTriangulation::gradientType* ttk::dcg::DiscreteGradient::gradient_ {}
protected

Definition at line 954 of file DiscreteGradient.h.

◆ inputOffsets_

const SimplexId* ttk::dcg::DiscreteGradient::inputOffsets_ {}
protected

Definition at line 955 of file DiscreteGradient.h.

◆ inputScalarField_

AbstractTriangulation::gradientKeyType ttk::dcg::DiscreteGradient::inputScalarField_ {}
protected

Definition at line 951 of file DiscreteGradient.h.

◆ IterationThreshold

int ttk::dcg::DiscreteGradient::IterationThreshold {50}
protected

Definition at line 939 of file DiscreteGradient.h.

◆ localGradient_

AbstractTriangulation::gradientType ttk::dcg::DiscreteGradient::localGradient_ {}
protected

Definition at line 949 of file DiscreteGradient.h.

◆ numberOfVertices_

SimplexId ttk::dcg::DiscreteGradient::numberOfVertices_ {}
protected

Definition at line 941 of file DiscreteGradient.h.

◆ OldBackEnd

BACKEND ttk::dcg::DiscreteGradient::OldBackEnd {BACKEND::CLASSIC_BACKEND}
protected

Definition at line 943 of file DiscreteGradient.h.

◆ OldReturnSaddleConnectors

bool ttk::dcg::DiscreteGradient::OldReturnSaddleConnectors {}
protected

Definition at line 947 of file DiscreteGradient.h.

◆ OldSeed

unsigned int ttk::dcg::DiscreteGradient::OldSeed {}
protected

Definition at line 945 of file DiscreteGradient.h.

◆ ReturnSaddleConnectors

bool ttk::dcg::DiscreteGradient::ReturnSaddleConnectors {}
protected

Definition at line 946 of file DiscreteGradient.h.

◆ SaddleConnectorsPersistenceThreshold

double ttk::dcg::DiscreteGradient::SaddleConnectorsPersistenceThreshold {}
protected

Definition at line 940 of file DiscreteGradient.h.

◆ Seed

unsigned int ttk::dcg::DiscreteGradient::Seed {}
protected

Definition at line 944 of file DiscreteGradient.h.


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