32 template <
typename dataType,
36 std::vector<ttk::DiagramType> &persistenceDiagrams,
37 const triangulationType *triangulation);
89template <
typename dataType,
typename triangulationType>
92 std::vector<ttk::DiagramType> &persistenceDiagrams,
93 const triangulationType *triangulation) {
95#ifdef TTK_ENABLE_OPENMP
96#pragma omp parallel for num_threads(threadNumber_)
98 for(
int i = 0; i < fieldNumber; ++i) {
101 persistenceDiagram.
execute(persistenceDiagrams[i],
106 for(
auto &pair : persistenceDiagrams[i]) {
107 triangulation->getVertexPoint(pair.birth.id, pair.birth.coords[0],
108 pair.birth.coords[1], pair.birth.coords[2]);
109 triangulation->getVertexPoint(pair.death.id, pair.death.coords[0],
110 pair.death.coords[1], pair.death.coords[2]);
111 pair.birth.sfValue =
static_cast<double *
>(
inputData_[i])[pair.birth.id];
112 pair.death.sfValue =
static_cast<double *
>(
inputData_[i])[pair.death.id];
AbstractTriangulation is an interface class that defines an interface for efficient traversal methods...
virtual int setThreadNumber(const int threadNumber)
Minimalist debugging class.
void setDebugMsgPrefix(const std::string &prefix)
TTK processing package for the computation of persistence diagrams.
void preconditionTriangulation(AbstractTriangulation *triangulation)
int execute(std::vector< PersistencePair > &CTDiagram, const scalarType *inputScalars, const size_t scalarsMTime, const SimplexId *inputOffsets, const triangulationType *triangulation, const std::vector< bool > *updateMask=nullptr)
void setInputOffsets(std::vector< SimplexId * > &io)
std::vector< SimplexId * > inputOffsets_
int setNumberOfInputs(int numberOfInputs)
void preconditionTriangulation(AbstractTriangulation *triangulation)
int setInputDataPointer(int idx, void *data)
void setInputScalars(std::vector< void * > &is)
int performDiagramComputation(int fieldNumber, std::vector< ttk::DiagramType > &persistenceDiagrams, const triangulationType *triangulation)
std::vector< void * > inputData_