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

#include <TopoMap.h>

Inheritance diagram for ttk::TopoMap:
ttk::Debug ttk::BaseClass

Public Types

enum class  STRATEGY { KRUSKAL = 0 , PRIM = 1 }
 

Public Member Functions

 TopoMap ()
 
 TopoMap (size_t angularSampleNb, bool checkMST, STRATEGY strategy)
 
 ~TopoMap () override
 
template<typename T >
int execute (T *outputCoords, int *insertionTime, const std::vector< T > &inputMatrix, bool isDistMat, size_t n)
 Computes the TopoMap projection.
 
- 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)
 

Protected Attributes

size_t AngularSampleNb {2}
 
bool CheckMST {false}
 
bool errorConvexHull {false}
 
STRATEGY Strategy {STRATEGY::KRUSKAL}
 
- 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

The TopoMap class computes a 2D projection of the points given as input, either by their distance matrix or by their coordinates.

Author
Alexandre Talon alexa.nosp@m.ndre.nosp@m..talo.nosp@m.n@li.nosp@m.p6.fr
Date
March 2023

This module defines the TopoMap class that embeds points into 2D. The input is a distance matrix representing the distances between any pair of points in high dimension. It computes the 2D coordinates of a projection of the points which preserves the distances of a minimum spanning tree computed by Kruskal's algorithm. It also preserves the components Kruskal's algorithm builds iteratively.

Related publication:
"Topomap: A 0-dimensional homology preserving projection of high-dimensional data"
Harish Doraiswamy, Julien Tierny, Paulo J. S. Silva, Luis Gustavo Nonato, and Claudio Silva
Proc. of IEEE VIS 2020.
IEEE Transactions on Visualization and Computer Graphics 27(2): 561-571, 2020.

Definition at line 69 of file TopoMap.h.

Member Enumeration Documentation

◆ STRATEGY

enum class ttk::TopoMap::STRATEGY
strong

We rely on constructing a minimal spanning tree. We allow for the two main algorithms to build one: Kruskal and Prim.

Enumerator
KRUSKAL 
PRIM 

Definition at line 75 of file TopoMap.h.

Constructor & Destructor Documentation

◆ TopoMap() [1/2]

ttk::TopoMap::TopoMap ( )

Definition at line 3 of file TopoMap.cpp.

◆ TopoMap() [2/2]

ttk::TopoMap::TopoMap ( size_t  angularSampleNb,
bool  checkMST,
STRATEGY  strategy 
)
inline

Definition at line 78 of file TopoMap.h.

◆ ~TopoMap()

ttk::TopoMap::~TopoMap ( )
overridedefault

Member Function Documentation

◆ execute()

template<typename T >
int ttk::TopoMap::execute ( T *  outputCoords,
int *  insertionTime,
const std::vector< T > &  inputMatrix,
bool  isDistMat,
size_t  n 
)

Computes the TopoMap projection.

Parameters
[out]outputCoordsthe final coordinates of the points, computed by TopoMap
[out]insertionTimean optional array indicating for each point at what time it was inserted in the projection.
[in]inputMatrixthe high-dimension input distance matrix or coordinates of the points
[in]isDistMatequal to true if inputMatrix is a distance matrix, false if it stores input point coordinates
[in]nthe number of input points
Returns
0 in case of success.

Definition at line 183 of file TopoMap.h.

Member Data Documentation

◆ AngularSampleNb

size_t ttk::TopoMap::AngularSampleNb {2}
protected

Definition at line 115 of file TopoMap.h.

◆ CheckMST

bool ttk::TopoMap::CheckMST {false}
protected

Definition at line 116 of file TopoMap.h.

◆ errorConvexHull

bool ttk::TopoMap::errorConvexHull {false}
protected

Definition at line 117 of file TopoMap.h.

◆ Strategy

STRATEGY ttk::TopoMap::Strategy {STRATEGY::KRUSKAL}
protected

Definition at line 118 of file TopoMap.h.


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