1 #ifndef SPECTRAL_PLACING_HPP
2 #define SPECTRAL_PLACING_HPP
4 #include "../structures/Graph.hpp"
17 template <
class Graph>
27 g.
updateNode(i, std::make_pair(pos.first[i], pos.second[i]));
std::pair< std::vector< float >, std::vector< float > > PositionsFromLaplacian(std::vector< float > laplacian, double factor=5.0)
Compute Positions from Laplacian using BLAS routine.
Definition: PositionsFromLaplacian.hpp:26
gl::index_type idx_t
Index type.
Definition: Graph.hpp:44
Stores and implements a Graph.
Definition: Graph.hpp:39
std::vector< float > LaplacianSTL(const Graph< S, STORAGE, DIR > &g)
Compute the Laplacian Matrix of a graph in an STL vector.
Definition: LaplacianSTL.hpp:21
idx_t numNodes() const
Returns the number of nodes currently in the graph.
Definition: Graph.hpp:406
void SpectralPlacing(Graph &g)
Compute node 2D positions using spectral placing.
Definition: SpectralPlacing.hpp:18
void updateNode(const idx_t &id, const std::string &label, const val_t &capacity, const gl::Color &color, const std::pair< float, float > &position)
Updates node properties. Parameter "id" mandatory, the rest optional.
Definition: Graph.hpp:1200