12 template <
class dataType>
16 std::vector<std::tuple<ftm::idNode, ftm::idNode, double>> &matchings,
17 std::vector<ftm::idNode> &matchingVector) {
18 matchingVector.clear();
20 std::numeric_limits<ftm::idNode>::max());
21 for(
unsigned int j = 0; j < matchings.size(); ++j) {
22 auto &match0 = std::get<0>(matchings[j]);
23 auto &match1 = std::get<1>(matchings[j]);
26 matchingVector[match0] = match1;
31 template <
class dataType>
35 std::vector<std::tuple<ftm::idNode, ftm::idNode, double>> &matchings,
36 std::vector<ftm::idNode> &matchingVector) {
37 std::vector<std::tuple<ftm::idNode, ftm::idNode, double>> invMatchings(
39 for(
unsigned int i = 0; i < matchings.size(); ++i)
40 invMatchings[i] = std::make_tuple(std::get<1>(matchings[i]),
41 std::get<0>(matchings[i]),
42 std::get<2>(matchings[i]));
47 std::vector<ftm::idNode> &matchingVector,
48 std::vector<ftm::idNode> &invMatchingVector);
50 template <
class dataType>
52 std::vector<ftm::idNode> &matchingVector,
53 std::vector<ftm::idNode> &invMatchingVector) {
60 template <
class dataType>
64 std::vector<std::vector<std::tuple<ftm::idNode, ftm::idNode, double>>>
66 std::vector<std::vector<ftm::idNode>> &matchingMatrix) {
67 matchingMatrix.clear();
68 matchingMatrix.resize(
70 std::vector<ftm::idNode>(
71 trees.size(), std::numeric_limits<ftm::idNode>::max()));
72 for(
unsigned int i = 0; i < trees.size(); ++i) {
73 std::vector<ftm::idNode> matchingVector;
75 barycenter, trees[i], matchings[i], matchingVector);
76 for(
unsigned int j = 0; j < matchingVector.size(); ++j)
77 matchingMatrix[j][i] = matchingVector[j];
85 const size_t numberCols,
93 int noAxes,
int axeNum,
int vId,
int vComp,
bool isSecondInput =
false);
idNode getNumberOfNodes() const
void getMatchingMatrix(const ftm::MergeTree< dataType > &barycenter, std::vector< ftm::MergeTree< dataType > > &trees, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings, std::vector< std::vector< ftm::idNode > > &matchingMatrix)
void zeroPadding(std::string &colName, const size_t numberCols, const size_t colIdx)
std::string getTableCoefficientNormName(int noAxes, int axeNum)
std::string getTableCorrelationPersName(int noAxes, int axeNum)
void reverseMatchingVector(unsigned int noNodes, std::vector< ftm::idNode > &matchingVector, std::vector< ftm::idNode > &invMatchingVector)
std::string getTableVectorName(int noAxes, int axeNum, int vId, int vComp, bool isSecondInput)
std::string getTableTreeName(int noTrees, int treeNum)
void getMatchingVector(const ftm::MergeTree< dataType > &barycenter, const ftm::MergeTree< dataType > &tree, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &matchings, std::vector< ftm::idNode > &matchingVector)
void getInverseMatchingVector(const ftm::MergeTree< dataType > &barycenter, const ftm::MergeTree< dataType > &tree, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &matchings, std::vector< ftm::idNode > &matchingVector)
std::string getTableCoefficientName(int noAxes, int axeNum)
std::string getTableCorrelationName(int noAxes, int axeNum)
TTK base package defining the standard types.