TTK
Loading...
Searching...
No Matches
PersistenceDiagramConstrainedOptimization.h
Go to the documentation of this file.
1#pragma once
2
4#include <Wrapper.h>
5
6namespace ttk {
7 using Matrix = std::vector<std::vector<double>>;
8
10
11 public:
13 this->setDebugMsgPrefix("PersistenceDiagramConstrainedOptimization");
14 };
15
16 void executeWeightsProjected(std::vector<Matrix> &hessianList,
17 std::vector<double> &weights,
18 const std::vector<double> &grad,
19 bool maxEigenValue);
20
21 void executeAtoms(
22 std::vector<ttk::DiagramType> &DictDiagrams,
23 const std::vector<std::vector<ttk::MatchingType>> &matchings,
24 const ttk::DiagramType &Barycenter,
25 const std::vector<Matrix> &gradsLists,
26 const std::vector<int> &checkerAtomsExt,
27 std::vector<std::vector<int>> &projForDiag,
28 ttk::DiagramType &featuresToAdd,
29 std::vector<std::array<double, 2>> &projLocations,
30 std::vector<std::vector<double>> &vectorForProjContrib,
31 std::vector<std::vector<std::array<double, 2>>> &pairToAddGradList,
32 ttk::DiagramType &infoToAdd);
33
34 void setStep(double &factEquiv);
35 void reduceStep();
36
37 protected:
38 void projectionOnSimplex(std::vector<double> &weights);
39
40 void gradientDescentWeights(std::vector<Matrix> &hessianList,
41 std::vector<double> &weights,
42 const std::vector<double> &grad,
43 bool maxEigenValue);
44
46 std::vector<ttk::DiagramType> &DictDiagrams,
47 const std::vector<std::vector<ttk::MatchingType>> &matchings,
48 const ttk::DiagramType &Barycenter,
49 const std::vector<Matrix> &gradsLists,
50 const std::vector<int> &checkerAtomsExt,
51 std::vector<std::vector<int>> &projForDiag,
52 ttk::DiagramType &featuresToAdd,
53 std::vector<std::array<double, 2>> &projLocations,
54 std::vector<std::vector<double>> &vectorForProjContrib,
55 std::vector<std::vector<std::array<double, 2>>> &pairToAddGradList,
56 ttk::DiagramType &infoToAdd);
57
58 double stepAtom_;
59 };
60
61} // namespace ttk
void setDebugMsgPrefix(const std::string &prefix)
Definition Debug.h:364
void gradientDescentWeights(std::vector< Matrix > &hessianList, std::vector< double > &weights, const std::vector< double > &grad, bool maxEigenValue)
void executeAtoms(std::vector< ttk::DiagramType > &DictDiagrams, const std::vector< std::vector< ttk::MatchingType > > &matchings, const ttk::DiagramType &Barycenter, const std::vector< Matrix > &gradsLists, const std::vector< int > &checkerAtomsExt, std::vector< std::vector< int > > &projForDiag, ttk::DiagramType &featuresToAdd, std::vector< std::array< double, 2 > > &projLocations, std::vector< std::vector< double > > &vectorForProjContrib, std::vector< std::vector< std::array< double, 2 > > > &pairToAddGradList, ttk::DiagramType &infoToAdd)
void gradientDescentAtoms(std::vector< ttk::DiagramType > &DictDiagrams, const std::vector< std::vector< ttk::MatchingType > > &matchings, const ttk::DiagramType &Barycenter, const std::vector< Matrix > &gradsLists, const std::vector< int > &checkerAtomsExt, std::vector< std::vector< int > > &projForDiag, ttk::DiagramType &featuresToAdd, std::vector< std::array< double, 2 > > &projLocations, std::vector< std::vector< double > > &vectorForProjContrib, std::vector< std::vector< std::array< double, 2 > > > &pairToAddGradList, ttk::DiagramType &infoToAdd)
void executeWeightsProjected(std::vector< Matrix > &hessianList, std::vector< double > &weights, const std::vector< double > &grad, bool maxEigenValue)
TTK base package defining the standard types.
std::vector< std::vector< double > > Matrix
std::vector< PersistencePair > DiagramType
Persistence Diagram type as a vector of Persistence pairs.