All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PivotMDS.h
Go to the documentation of this file.
1 /*
2  * PivotMDS.h
3  *
4  * Created on: Jul 7, 2016
5  * Author: Michael Wegner (michael.wegner@student.kit.edu)
6  */
7 
8 #ifndef NETWORKIT_CPP_VIZ_PIVOTMDS_H_
9 #define NETWORKIT_CPP_VIZ_PIVOTMDS_H_
10 
11 #include "GraphLayoutAlgorithm.h"
12 
13 #include "../algebraic/CSRMatrix.h"
14 #include "../algebraic/Vector.h"
15 
16 #include "../graph/Graph.h"
17 
18 namespace NetworKit {
19 
25 class PivotMDS : public GraphLayoutAlgorithm<double> {
26 public:
34  PivotMDS(const Graph& graph, count dim, count numPivots);
35 
36  /*
37  * Default destructor
38  */
39  virtual ~PivotMDS() = default;
40 
44  void run() override;
45 
46 private:
47  count dim;
48  count numPivots;
49 
53  std::vector<node> computePivots();
54 
59  void powerMethod(const CSRMatrix& mat, const count n, Vector& eigenvector, double& eigenvalue);
60 };
61 
62 } /* namespace NetworKit */
63 
64 #endif /* NETWORKIT_CPP_VIZ_PIVOTMDS_H_ */
void run() override
Runs the PivotMDS algorithm.
Definition: PivotMDS.cpp:23
PivotMDS(const Graph &graph, count dim, count numPivots)
Constructs a PivotMDS object for the given graph.
Definition: PivotMDS.cpp:20
Abstract base class for algorithms that compute a layout of the Graph vertices in d-dimensional space...
Definition: GraphLayoutAlgorithm.h:26
Implementation of PivotMDS proposed by Brandes and Pich.
Definition: PivotMDS.h:25
uint64_t count
Definition: Globals.h:21
The Vector class represents a basic vector with double coefficients.
Definition: Vector.h:25
The CSRMatrix class represents a sparse matrix stored in CSR-Format (i.e.
Definition: CSRMatrix.h:26
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
virtual ~PivotMDS()=default