TTK
|
TTK processing package for progressive Topological Data Analysis. More...
#include <ApproximateTopology.h>
Public Member Functions | |
ApproximateTopology () | |
void | setEpsilon (double data) |
void | setDelta (double data) |
template<typename scalarType > | |
int | computeApproximatePD (std::vector< PersistencePair > &CTDiagram, const scalarType *scalars, scalarType *const fakeScalars, SimplexId *const outputOffsets, int *const outputMonotonyOffsets) |
template<typename scalarType > | |
int | executeApproximateTopology (const scalarType *scalars, scalarType *fakeScalars, SimplexId *outputOffsets, int *outputMonotonyOffsets) |
template<typename scalarType , typename offsetType > | |
void | initGlobalPolarity (std::vector< polarity > &isNew, std::vector< std::vector< std::pair< polarity, polarity > > > &vertexLinkPolarity, std::vector< polarity > &toProcess, const scalarType *fakeScalars, const offsetType *const offsets, const int *const monotonyOffsets) const |
template<typename scalarType , typename offsetType > | |
void | updatePropagation (std::vector< polarity > &toPropagateMin, std::vector< polarity > &toPropagateMax, std::vector< std::vector< SimplexId > > &vertexRepresentativesMin, std::vector< std::vector< SimplexId > > &vertexRepresentativesMax, std::vector< std::vector< SimplexId > > &saddleCCMin, std::vector< std::vector< SimplexId > > &saddleCCMax, std::vector< Lock > &vertLockMin, std::vector< Lock > &vertLockMax, std::vector< polarity > &isUpdatedMin, std::vector< polarity > &isUpdatedMax, const scalarType *fakeScalars, const offsetType *const offsetField, const int *const monotonyOffsets) |
template<typename scalarType , typename offsetType > | |
void | buildVertexLinkPolarityApproximate (const SimplexId vertexId, std::vector< std::pair< polarity, polarity > > &vlp, const scalarType *fakeScalars, const offsetType *const offsetField, const int *const monotonyOffsets) const |
template<typename ScalarType , typename OffsetType > | |
void | sortTripletsApproximate (std::vector< triplet > &triplets, const ScalarType *const scalars, const ScalarType *const fakeScalars, const OffsetType *const offsets, const int *const monotonyOffsets, const bool splitTree) const |
template<typename scalarType , typename offsetType > | |
void | getCriticalTypeApproximate (const SimplexId &vertexId, std::vector< std::pair< polarity, polarity > > &vlp, uint8_t &vertexLink, DynamicTree &link, VLBoundaryType &vlbt, const scalarType *fakeScalars, const offsetType *const offsets, const int *const monotonyOffsets) const |
template<typename ScalarType , typename offsetType > | |
void | computeCriticalPoints (std::vector< std::vector< std::pair< polarity, polarity > > > &vertexLinkPolarity, std::vector< polarity > &toPropagateMin, std::vector< polarity > &toPropagateMax, std::vector< polarity > &toProcess, std::vector< DynamicTree > &link, std::vector< uint8_t > &vertexLink, VLBoundaryType &vertexLinkByBoundaryType, std::vector< std::vector< SimplexId > > &saddleCCMin, std::vector< std::vector< SimplexId > > &saddleCCMax, ScalarType *fakeScalars, const offsetType *const offsets, int *monotonyOffsets) |
template<typename scalarType , typename offsetType > | |
ttk::SimplexId | propagateFromSaddles (const SimplexId vertexId, std::vector< Lock > &vertLock, std::vector< polarity > &toPropagate, std::vector< std::vector< SimplexId > > &vertexRepresentatives, std::vector< std::vector< SimplexId > > &saddleCC, std::vector< polarity > &isUpdated, std::vector< SimplexId > &globalExtremum, const bool splitTree, const scalarType *fakeScalars, const offsetType *const offsetField, const int *const monotonyOffsets) const |
template<typename ScalarType , typename offsetType > | |
void | computePersistencePairsFromSaddles (std::vector< PersistencePair > &CTDiagram, const ScalarType *const fakeScalars, const offsetType *const offsets, const int *const monotonyOffsets, std::vector< std::vector< SimplexId > > &vertexRepresentativesMin, std::vector< std::vector< SimplexId > > &vertexRepresentativesMax, const std::vector< polarity > &toPropagateMin, const std::vector< polarity > &toPropagateMax) const |
template<typename scalarType , typename offsetType > | |
void | sortVertices (const SimplexId vertexNumber, std::vector< SimplexId > &sortedVertices, SimplexId *vertsOrder, const scalarType *const fakeScalars, const offsetType *const offsetField, const int *const monotonyOffsets) |
template<typename scalarType > | |
int | sortPersistenceDiagramApproximate (std::vector< PersistencePair > &diagram, scalarType *fakeScalars, const SimplexId *const offsets, int *monotonyOffsets) const |
template<typename scalarType > | |
int | executeApproximateTopology (const scalarType *ttkNotUsed(scalars), scalarType *fakeScalars, SimplexId *outputOffsets, int *outputMonotonyOffsets) |
template<typename ScalarType , typename OffsetType > | |
void | computePersistencePairsFromSaddles (std::vector< PersistencePair > &CTDiagram, const ScalarType *const fakeScalars, const OffsetType *const offsets, const int *const monotonyOffsets, std::vector< std::vector< SimplexId > > &vertexRepresentativesMin, std::vector< std::vector< SimplexId > > &vertexRepresentativesMax, const std::vector< polarity > &toPropagateMin, const std::vector< polarity > &toPropagateMax) const |
![]() | |
MultiresTopology () | |
void | setupTriangulation (ImplicitTriangulation *const data) |
virtual void | setStartingDecimationLevel (int data) |
virtual void | setStoppingDecimationLevel (int data) |
virtual void | setPreallocateMemory (const bool b) |
int | getStoppingDecimationLevel () |
void | setStartingResolutionLevel (int rl) |
void | setStoppingResolutionLevel (int rl) |
![]() | |
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) |
![]() | |
BaseClass () | |
virtual | ~BaseClass ()=default |
int | getThreadNumber () const |
virtual int | setThreadNumber (const int threadNumber) |
Protected Types | |
using | VLBoundaryType = std::array< std::vector< std::pair< SimplexId, SimplexId > >, nLink_ > |
![]() | |
using | VLBoundaryType = std::array< std::vector< std::pair< SimplexId, SimplexId > >, nLink_ > |
Protected Member Functions | |
void | initCriticalPoints (std::vector< polarity > &isNew, std::vector< std::vector< std::pair< polarity, polarity > > > &vertexLinkPolarity, std::vector< polarity > &toProcess, std::vector< DynamicTree > &link, std::vector< uint8_t > &vertexLink, VLBoundaryType &vertexLinkByBoundaryType, std::vector< char > &vertexTypes, const SimplexId *const offsets) const |
void | initSaddleSeeds (std::vector< polarity > &isNew, std::vector< std::vector< std::pair< polarity, polarity > > > &vertexLinkPolarity, std::vector< polarity > &toPropagateMin, std::vector< polarity > &toPropagateMax, std::vector< polarity > &toProcess, std::vector< DynamicTree > &link, std::vector< uint8_t > &vertexLink, VLBoundaryType &vertexLinkByBoundaryType, std::vector< std::vector< SimplexId > > &saddleCCMin, std::vector< std::vector< SimplexId > > &saddleCCMax, const SimplexId *const offsets) const |
template<typename scalarType , typename offsetType > | |
void | updatePropagation (std::vector< polarity > &toPropagateMin, std::vector< polarity > &toPropagateMax, std::vector< std::vector< SimplexId > > &vertexRepresentativesMin, std::vector< std::vector< SimplexId > > &vertexRepresentativesMax, std::vector< std::vector< SimplexId > > &saddleCCMin, std::vector< std::vector< SimplexId > > &saddleCCMax, std::vector< Lock > &vertLockMin, std::vector< Lock > &vertLockMax, std::vector< polarity > &isUpdatedMin, std::vector< polarity > &isUpdatedMax, const scalarType *fakeScalars, const offsetType *const offsets, const int *const monotonyOffsets) const |
template<typename scalarType , typename offsetType > | |
void | buildVertexLinkPolarity (const SimplexId vertexId, std::vector< std::pair< polarity, polarity > > &vlp, const scalarType *fakeScalars, const offsetType *const offsets, const int *const monotonyOffsets) const |
template<typename ScalarType , typename OffsetType > | |
void | sortTriplets (std::vector< triplet > &triplets, const ScalarType *const fakeScalars, const OffsetType *const offsets, const int *const monotonyOffsets, const bool splitTree) const |
template<typename scalarType , typename offsetType > | |
void | tripletsToPersistencePairs (std::vector< PersistencePair > &pairs, std::vector< std::vector< SimplexId > > &vertexRepresentatives, std::vector< triplet > &triplets, const scalarType *const fakeScalars, const offsetType *const offsets, const int *const monotonyOffsets, const bool splitTree) const |
template<typename scalarType , typename offsetType > | |
int | getMonotonyChangeByOldPointCPApproximate (const SimplexId vertexId, double eps, const std::vector< polarity > &isNew, std::vector< polarity > &toProcess, std::vector< polarity > &toReprocess, std::vector< std::pair< polarity, polarity > > &vlp, scalarType *fakeScalars, const offsetType *const offsets, int *monotonyOffsets) const |
template<typename ScalarType , typename offsetType > | |
int | updateGlobalPolarity (double eps, std::vector< polarity > &isNew, std::vector< std::vector< std::pair< polarity, polarity > > > &vertexLinkPolarity, std::vector< polarity > &toProcess, std::vector< polarity > &toReprocess, ScalarType *fakeScalars, const offsetType *const offsets, int *monotonyOffsets) const |
ttk::SimplexId | propagateFromSaddles (const SimplexId vertexId, std::vector< Lock > &vertLock, std::vector< polarity > &toPropagate, std::vector< std::vector< SimplexId > > &vertexRepresentatives, std::vector< std::vector< SimplexId > > &saddleCC, std::vector< polarity > &isUpdated, std::vector< SimplexId > &globalExtremum, const SimplexId *const offsets, const bool splitTree) const |
void | computePersistencePairsFromSaddles (std::vector< PersistencePair > &CTDiagram, const SimplexId *const offsets, std::vector< std::vector< SimplexId > > &vertexRepresentativesMin, std::vector< std::vector< SimplexId > > &vertexRepresentativesMax, const std::vector< polarity > &toPropagateMin, const std::vector< polarity > &toPropagateMax) const |
template<typename scalarType , typename offsetType > | |
bool | printPolarity (std::vector< polarity > &isNew, const SimplexId vertexId, std::vector< std::vector< std::pair< polarity, polarity > > > &vertexLinkPolarity, const scalarType *scalars, const scalarType *fakeScalars, const offsetType *const offsets, const int *const monotonyOffsets, bool verbose=false) |
![]() | |
void | buildVertexLinkByBoundary (const SimplexId vertexId, VLBoundaryType &vlbt) const |
char | getCriticalTypeFromLink (const std::vector< std::pair< polarity, polarity > > &vlp, DynamicTree &link) const |
void | getValencesFromLink (const SimplexId vertexId, const std::vector< std::pair< polarity, polarity > > &vlp, DynamicTree &link, std::vector< polarity > &toPropagateMin, std::vector< polarity > &toPropagateMax, std::vector< std::vector< SimplexId > > &saddleCCMin, std::vector< std::vector< SimplexId > > &saddleCCMax) const |
void | getTripletsFromSaddles (const SimplexId vertexId, std::vector< triplet > &triplets, const std::vector< std::vector< SimplexId > > &vertexReps) const |
void | updateLinkPolarityPonctual (std::vector< std::pair< polarity, polarity > > &vlp) const |
std::string | resolutionInfoString () |
![]() | |
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 | |
double | epsilon_ {} |
double | delta_ {} |
![]() | |
ImplicitTriangulation * | triangulation_ {} |
MultiresTriangulation | multiresTriangulation_ {} |
SimplexId | globalMax_ {} |
SimplexId | globalMin_ {} |
int | decimationLevel_ {} |
int | startingDecimationLevel_ {} |
int | stoppingDecimationLevel_ {} |
bool | preallocateMemory_ {true} |
std::vector< PersistencePair > | CTDiagram_ {} |
![]() | |
int | debugLevel_ |
std::string | debugMsgPrefix_ |
std::string | debugMsgNamePrefix_ |
![]() | |
bool | lastObject_ |
int | threadNumber_ |
Wrapper * | wrapper_ |
Static Protected Attributes | |
static const size_t | nLink_ = 27 |
![]() | |
static const size_t | nLink_ = 27 |
![]() | |
static COMMON_EXPORTS debug::LineMode | lastLineMode = ttk::debug::LineMode::NEW |
TTK processing package for progressive Topological Data Analysis.
This package introduces an approximation algorithm for the computation of the extremum-saddle persistence diagram of a scalar field. The approximation comes with a user-controlled error on the Bottleneck distance to the exact diagram.
Related publication
"Fast Approximation of Persistence Diagrams with Guarantees"
Jules Vidal, Julien Tierny
IEEE Symposium on Large Data Visualization and Analysis (LDAV), 2021
Definition at line 36 of file ApproximateTopology.h.
|
protected |
Definition at line 172 of file ApproximateTopology.h.
|
inline |
Definition at line 39 of file ApproximateTopology.h.
|
protected |
void ttk::ApproximateTopology::buildVertexLinkPolarityApproximate | ( | const SimplexId | vertexId, |
std::vector< std::pair< polarity, polarity > > & | vlp, | ||
const scalarType * | fakeScalars, | ||
const offsetType *const | offsetField, | ||
const int *const | monotonyOffsets | ||
) | const |
Definition at line 1027 of file ApproximateTopology.h.
int ttk::ApproximateTopology::computeApproximatePD | ( | std::vector< PersistencePair > & | CTDiagram, |
const scalarType * | scalars, | ||
scalarType *const | fakeScalars, | ||
SimplexId *const | outputOffsets, | ||
int *const | outputMonotonyOffsets | ||
) |
Definition at line 1314 of file ApproximateTopology.h.
void ttk::ApproximateTopology::computeCriticalPoints | ( | std::vector< std::vector< std::pair< polarity, polarity > > > & | vertexLinkPolarity, |
std::vector< polarity > & | toPropagateMin, | ||
std::vector< polarity > & | toPropagateMax, | ||
std::vector< polarity > & | toProcess, | ||
std::vector< DynamicTree > & | link, | ||
std::vector< uint8_t > & | vertexLink, | ||
VLBoundaryType & | vertexLinkByBoundaryType, | ||
std::vector< std::vector< SimplexId > > & | saddleCCMin, | ||
std::vector< std::vector< SimplexId > > & | saddleCCMax, | ||
ScalarType * | fakeScalars, | ||
const offsetType *const | offsets, | ||
int * | monotonyOffsets | ||
) |
Definition at line 1250 of file ApproximateTopology.h.
void ttk::ApproximateTopology::computePersistencePairsFromSaddles | ( | std::vector< PersistencePair > & | CTDiagram, |
const ScalarType *const | fakeScalars, | ||
const offsetType *const | offsets, | ||
const int *const | monotonyOffsets, | ||
std::vector< std::vector< SimplexId > > & | vertexRepresentativesMin, | ||
std::vector< std::vector< SimplexId > > & | vertexRepresentativesMax, | ||
const std::vector< polarity > & | toPropagateMin, | ||
const std::vector< polarity > & | toPropagateMax | ||
) | const |
void ttk::ApproximateTopology::computePersistencePairsFromSaddles | ( | std::vector< PersistencePair > & | CTDiagram, |
const ScalarType *const | fakeScalars, | ||
const OffsetType *const | offsets, | ||
const int *const | monotonyOffsets, | ||
std::vector< std::vector< SimplexId > > & | vertexRepresentativesMin, | ||
std::vector< std::vector< SimplexId > > & | vertexRepresentativesMax, | ||
const std::vector< polarity > & | toPropagateMin, | ||
const std::vector< polarity > & | toPropagateMax | ||
) | const |
Definition at line 460 of file ApproximateTopology.h.
|
protected |
int ttk::ApproximateTopology::executeApproximateTopology | ( | const scalarType * | scalars, |
scalarType * | fakeScalars, | ||
SimplexId * | outputOffsets, | ||
int * | outputMonotonyOffsets | ||
) |
int ttk::ApproximateTopology::executeApproximateTopology | ( | const scalarType * | ttkNotUsedscalars, |
scalarType * | fakeScalars, | ||
SimplexId * | outputOffsets, | ||
int * | outputMonotonyOffsets | ||
) |
Definition at line 300 of file ApproximateTopology.h.
void ttk::ApproximateTopology::getCriticalTypeApproximate | ( | const SimplexId & | vertexId, |
std::vector< std::pair< polarity, polarity > > & | vlp, | ||
uint8_t & | vertexLink, | ||
DynamicTree & | link, | ||
VLBoundaryType & | vlbt, | ||
const scalarType * | fakeScalars, | ||
const offsetType *const | offsets, | ||
const int *const | monotonyOffsets | ||
) | const |
Definition at line 1135 of file ApproximateTopology.h.
|
protected |
Definition at line 667 of file ApproximateTopology.h.
|
protected |
void ttk::ApproximateTopology::initGlobalPolarity | ( | std::vector< polarity > & | isNew, |
std::vector< std::vector< std::pair< polarity, polarity > > > & | vertexLinkPolarity, | ||
std::vector< polarity > & | toProcess, | ||
const scalarType * | fakeScalars, | ||
const offsetType *const | offsets, | ||
const int *const | monotonyOffsets | ||
) | const |
Definition at line 1171 of file ApproximateTopology.h.
|
protected |
|
protected |
Definition at line 1056 of file ApproximateTopology.h.
ttk::SimplexId ttk::ApproximateTopology::propagateFromSaddles | ( | const SimplexId | vertexId, |
std::vector< Lock > & | vertLock, | ||
std::vector< polarity > & | toPropagate, | ||
std::vector< std::vector< SimplexId > > & | vertexRepresentatives, | ||
std::vector< std::vector< SimplexId > > & | saddleCC, | ||
std::vector< polarity > & | isUpdated, | ||
std::vector< SimplexId > & | globalExtremum, | ||
const bool | splitTree, | ||
const scalarType * | fakeScalars, | ||
const offsetType *const | offsetField, | ||
const int *const | monotonyOffsets | ||
) | const |
Definition at line 788 of file ApproximateTopology.h.
|
protected |
|
inline |
Definition at line 45 of file ApproximateTopology.h.
|
inline |
Definition at line 42 of file ApproximateTopology.h.
int ttk::ApproximateTopology::sortPersistenceDiagramApproximate | ( | std::vector< PersistencePair > & | diagram, |
scalarType * | fakeScalars, | ||
const SimplexId *const | offsets, | ||
int * | monotonyOffsets | ||
) | const |
Definition at line 1291 of file ApproximateTopology.h.
|
protected |
Definition at line 520 of file ApproximateTopology.h.
void ttk::ApproximateTopology::sortTripletsApproximate | ( | std::vector< triplet > & | triplets, |
const ScalarType *const | scalars, | ||
const ScalarType *const | fakeScalars, | ||
const OffsetType *const | offsets, | ||
const int *const | monotonyOffsets, | ||
const bool | splitTree | ||
) | const |
void ttk::ApproximateTopology::sortVertices | ( | const SimplexId | vertexNumber, |
std::vector< SimplexId > & | sortedVertices, | ||
SimplexId * | vertsOrder, | ||
const scalarType *const | fakeScalars, | ||
const offsetType *const | offsetField, | ||
const int *const | monotonyOffsets | ||
) |
Definition at line 635 of file ApproximateTopology.h.
|
protected |
Definition at line 552 of file ApproximateTopology.h.
|
protected |
Definition at line 1198 of file ApproximateTopology.h.
void ttk::ApproximateTopology::updatePropagation | ( | std::vector< polarity > & | toPropagateMin, |
std::vector< polarity > & | toPropagateMax, | ||
std::vector< std::vector< SimplexId > > & | vertexRepresentativesMin, | ||
std::vector< std::vector< SimplexId > > & | vertexRepresentativesMax, | ||
std::vector< std::vector< SimplexId > > & | saddleCCMin, | ||
std::vector< std::vector< SimplexId > > & | saddleCCMax, | ||
std::vector< Lock > & | vertLockMin, | ||
std::vector< Lock > & | vertLockMax, | ||
std::vector< polarity > & | isUpdatedMin, | ||
std::vector< polarity > & | isUpdatedMax, | ||
const scalarType * | fakeScalars, | ||
const offsetType *const | offsetField, | ||
const int *const | monotonyOffsets | ||
) |
Definition at line 921 of file ApproximateTopology.h.
|
protected |
|
protected |
Definition at line 295 of file ApproximateTopology.h.
|
protected |
Definition at line 294 of file ApproximateTopology.h.
|
staticprotected |
Definition at line 171 of file ApproximateTopology.h.