[Graph] changes in 1_40

Hi, I've noticed that the Graph library has changed in the new version, though the documentation and the examples have not been updated. I am trying to use the fruchterman_reingold algorithm. I am confused as to the new parameters topology, origin and extent that are passed to the function. I think topology is given by xmin, ymin, xmax, ymax for a rectangular topology. For the origin, I have used topology.center() But I am at loss as to what the extent is and what I should assign it. Can someone please explain these new parameters and what values are expected. Thank you.

On Wed, Nov 18, 2009 at 5:19 AM, Meththa
Hi,
I've noticed that the Graph library has changed in the new version, though the documentation and the examples have not been updated. I am trying to use the fruchterman_reingold algorithm. I am confused as to the new parameters topology, origin and extent that are passed to the function.
I think topology is given by xmin, ymin, xmax, ymax for a rectangular topology.
For the origin, I have used topology.center()
But I am at loss as to what the extent is and what I should assign it. Can someone please explain these new parameters and what values are expected.
This is not an answer to the question (I do not know the graph library yet, although I will need to in the next few months), but please please please, if you are going to post a non-text email, do not make your text black. My monitor has a black background, so all I saw was "Hi," then a big black chunk before the Boost-users mailing list footer. Please use text mode, or *never* specify a text color, or if you do specify a text color then specify a background color too so things like black text does not disappear on a black background...

On Wed, 18 Nov 2009, Meththa wrote:
Hi,
I've noticed that the Graph library has changed in the new version, though the documentation and the examples have not been updated. I am trying to use the fruchterman_reingold algorithm. I am confused as to the new parameters topology, origin and extent that are passed to the function.
I think topology is given by xmin, ymin, xmax, ymax for a rectangular topology.
For the origin, I have used topology.center()
But I am at loss as to what the extent is and what I should assign it. Can someone please explain these new parameters and what values are expected.
As another reply (which was probably to your post) said, 1.41 no longer requires the origin or extent parameters. The topology can just be rectangle_topology, which has the min/max parameters you are using. -- Jeremiah Willcock

Thank you for all your replies. I have now updated to boost_1_41 and as you said it only uses Topology. Only problem I have now is at compile time I get an error within the Fruchterman_Reigold algorithm itself given below.
..\boost_1_41_0\boost\graph\fruchterman_reingold.hpp|95|error: 'dimensions' is not a member of 'point'|
It is pointing to the BOOST_STATIC_ASSERT within the Fruchterman_Reingold algorithm as shown below.
template
PS I hope there is no problems viewing this email. I am not sure what happened to the first post as I had not used any font coloring as such.

On Thu, 19 Nov 2009, Meththa wrote:
Thank you for all your replies. I have now updated to boost_1_41 and as you said it only uses Topology. Only problem I have now is at compile time I get an error within the Fruchterman_Reigold algorithm itself given below.
..\boost_1_41_0\boost\graph\fruchterman_reingold.hpp|95|error: 'dimensions' is not a member of 'point'|
It is pointing to the BOOST_STATIC_ASSERT within the Fruchterman_Reingold algorithm as shown below.
template
struct grid_force_pairs { typedef typename property_traits<PositionMap>::value_type Point; BOOST_STATIC_ASSERT (Point::dimensions == 2); typedef typename Topology::point_difference_type point_difference_type; ... any ideas why I am getting this error? Is this a bug within the library itself?
Thanks.
Which topology are you using? This seems like a compiler bug -- rectangle_topology::point is just convex_topology<2>::point which has a dimensions member. You can try changing the BOOST_STATIC_CONSTANT that defines it to an explicit enum or static const member variable; one of those might fix the problem. Otherwise, the quick fix is to just remove the static assert. -- Jeremiah Willcock
participants (3)
-
Jeremiah Willcock
-
Meththa
-
OvermindDL1