a little Graph guidance (looking for hints)
Hi Just turned to Boost - What a fantastic library :) I have a question about the construction of a Graph. I can't figure out how to use boost to represent a graph where each Vertex has several outs. F.ex Vertex 1 has out 1, 2 and 3. Vertex A has in a, b and c. I can then make edges going from 1-a, 1-b, 2-b etc. Like F.ex http://messe.harmony-central.com/Musikmesse05/Content/Native_Instruments/PR/... Reaktor Any hints? Thank you Carsten -- View this message in context: http://www.nabble.com/a-little-Graph-guidance-%28looking-for-hints%29-tp1908... Sent from the Boost - Users mailing list archive at Nabble.com.
Carsten Hoyer wrote:
Hi Just turned to Boost - What a fantastic library :)
I have a question about the construction of a Graph. I can't figure out how to use boost to represent a graph where each Vertex has several outs. F.ex Vertex 1 has out 1, 2 and 3. Vertex A has in a, b and c. I can then make edges going from 1-a, 1-b, 2-b etc. Like F.ex http://messe.harmony-central.com/Musikmesse05/Content/Native_Instruments/PR/... Reaktor
Any hints? Thank you Carsten
add_edge(node1, node2, g); add_edge(node1, node3, g); add_edge(node1, node4, g);
On Søn, August 24, 2008 18:45, Raindog wrote:
Carsten Hoyer wrote:
Hi Just turned to Boost - What a fantastic library :)
I have a question about the construction of a Graph. I can't figure out how to use boost to represent a graph where each Vertex has several outs. F.ex Vertex 1 has out 1, 2 and 3. Vertex A has in a, b and c. I can then make edges going from 1-a, 1-b, 2-b etc. Like F.ex http://messe.harmony-central.com/Musikmesse05/Content/Native_Instruments/PR/... r-5-interface-lg.jpg Reaktor
Any hints? Thank you Carsten
add_edge(node1, node2, g); add_edge(node1, node3, g); add_edge(node1, node4, g);
That wouldn´t be enough would it? Then i only have the connection between the two nodes, but i need a little more information embedded. Every node has a sub-input and sub-output. So it should be something like add_edge(node1, output1, node3, input1, g); Which, as i write it, makes me think i should derive a class from the kind of list i choose to implement the graph with. Right?
On Mon, Aug 25, 2008 at 09:13:49AM +0200, Carsten Høyer wrote:
That wouldn?t be enough would it? Then i only have the connection between the two
The easiest way to do it is to introduce a new node for every port, but then you will loose the information about grouping of ports into your "original" nodes. So you'd need an extra structure / subgraph that accomplishes the latter. Maybe an extra property on the ports which signifies to which "node" they belong.
Just want to thank you all for your inputs. I don't have that much spare time, so not much programming going on right know. Anyway, I will try and make something from your suggestions and if that fails I will return to this thread. Thanks again Carsten
Carsten Høyer wrote:
On Søn, August 24, 2008 18:45, Raindog wrote:
Carsten Hoyer wrote:
Hi Just turned to Boost - What a fantastic library :)
I have a question about the construction of a Graph. I can't figure out how to use boost to represent a graph where each Vertex has several outs. F.ex Vertex 1 has out 1, 2 and 3. Vertex A has in a, b and c. I can then make edges going from 1-a, 1-b, 2-b etc. Like F.ex http://messe.harmony-central.com/Musikmesse05/Content/Native_Instruments/PR/... r-5-interface-lg.jpg Reaktor
Any hints? Thank you Carsten
add_edge(node1, node2, g); add_edge(node1, node3, g); add_edge(node1, node4, g);
That wouldn´t be enough would it? Then i only have the connection between the two nodes, but i need a little more information embedded. Every node has a sub-input and sub-output. So it should be something like add_edge(node1, output1, node3, input1, g); Which, as i write it, makes me think i should derive a class from the kind of list i choose to implement the graph with. Right? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I believe that there is an overload that allows associated properties with the created nodes.
participants (4)
-
Carsten Hoyer
-
Carsten Høyer
-
Raindog
-
Zeljko Vrba