1 #ifndef GL_WRITE_IMAGE_HPP
2 #define GL_WRITE_IMAGE_HPP
4 #include "../structures/Graph.hpp"
5 #include "../algorithms/SpectralPlacing.hpp"
6 #include "../algorithms/LaplacianSTL.hpp"
22 template <
class SCALAR,
class STORAGE_KIND,
class DIRECTION>
46 gr->SetRange(
'x', minX, maxX);
47 gr->SetRange(
'y', minY, maxY);
55 std::string output_args = lineArgs;
56 output_args +=
"{x" + it->color().RGB() +
"}";
58 gr->Line(p1, p2, output_args.data());
65 #endif // GL_WRITE_IMAGE_HPP
ConstEdgeIterator edge_cbegin() const
ConstEdgeIterator to the first edge.
Definition: Graph.hpp:967
Stores and implements a Graph.
Definition: Graph.hpp:39
ConstNodeIterator node_cbegin() const
ConstNodeIterator to the first node.
Definition: Graph.hpp:1367
ConstEdgeIterator edge_cend() const
ConstEdgeIterator to the last edge.
Definition: Graph.hpp:989
void SpectralPlacing(Graph &g)
Compute node 2D positions using spectral placing.
Definition: SpectralPlacing.hpp:18
ConstNodeIterator node_cend() const
ConstNodeIterator to behind the last node.
Definition: Graph.hpp:1375
void saveImage(mglGraph *gr, gl::Graph< SCALAR, STORAGE_KIND, DIRECTION > &g, const char *lineArgs="")
Plot graph using mgl2.
Definition: WriteImage.hpp:23
std::pair< float, float > getNodePosition(const idx_t &id) const
Finds the position of the given node.
Definition: Graph.hpp:1273