Hello,
Are there ways to generate Graph with edges by the user defined function?
Should I generate Vertex relations by hand then put it in to Graph?
I would like to feed graph by points 3d and each point is linked to its
closest neighbor by distance. Then as a next step I would like to dig in the
graph the sub-graphs with the given linking length.
My Data structure is following:
_____________________
class CCoord
{
public:
CCoord(){};
CCoord(int id_,MyFloat x_,MyFloat y_,MyFloat z_, MyFloat w_=0):
id(id_), x(x_), y(y_), z(z_), w(w_){
if(w==0.0)
w=sqrt(x*x+y*y+z*z);
};
MyFloat x, y, z;
int id;
MyFloat w;
}
typedef std::vector<CCoord> typeVecData;
typedef adjacency_list < vecS, vecS, undirectedS,
no_property, property < edge_weight_t, MyFloat > > Graph;
typedef graph_traits < Graph >::edge_descriptor Edge;
typedef graph_traits < Graph >::vertex_descriptor Vertex;
typedef std::pair