15 Nisan 2017 Cumartesi

graph boost::fruchterman_reingold_force_directed_layout metodu

Giriş
Şu satırı dahil ederiz.
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/fruchterman_reingold.hpp>
boost::fruchterman_reingold_force_directed_layout metodu
Elimizde şöyle bir tanım olsun
typedef boost::rectangle_topology<> RectTopology;
typedef RectTopology::point_type point;
Şöyle yaparız.
Graph g = ...

boost::minstd_rand gen;
RectTopology rect_top(gen, -25, -25, 25, 25);

boost::fruchterman_reingold_force_directed_layout(g, boost::get(&Vertex::position,
  g), rect_top,boost::vertex_index_map(vertexIdPropertyMa‌​p));

Hiç yorum yok:

Yorum Gönder