Boost logo

Boost :

From: Manish Mangal (mmangal_at_[hidden])
Date: 2005-03-29 19:33:05


Hi

I am not able to use set_property function for reverse Graphs. I am using
C++7.0 on .Net2003 compiler.

I read an earlier question posted at
http://lists.boost.org/MailArchives/boost-users/msg06970.php

This sounded similar to my problem.

The solution posted by Jeremy
http://lists.boost.org/MailArchives/boost/msg66361.php

runs fine on my machine . So I decided to use get_property instead of
set_property as suggested in the solution. This did not solve my problem

So I took Jeremy's solution and replaced subgraph by reverse_graph.

Even that code generated:

error C2784 could not deduce template argument list..

 

The code is:

#include <string>

#include <iostream>

#include <boost/cstdlib.hpp>

#include <boost/graph/adjacency_list.hpp>

#include <boost/graph/reverse_graph.hpp>

int

main()

{

  using namespace boost;

  using std::string;

 

  typedef adjacency_list<vecS, vecS, directedS,no_property,

    property<edge_index_t, int>,

    property<graph_name_t, string> > graph_t;

 

  graph_t g;

  get_property(g, graph_name) = "graph";

 

  std::cout << "name: " << get_property(g, graph_name) << std::endl;

 

  typedef reverse_graph<graph_t> reverse_graph_t;

 

  reverse_graph_t sg = reverse_graph_t(g);

  get_property(sg, graph_name) = "Reverse graph";

 

  std::cout << "name: " << get_property(sg, graph_name) << std::endl;

 

  return exit_success;

}

 

 

Can anyone suggest how to make this work?

Much appreciated

 

Manish Mangal

Stratagen Systems

1-425.821.8454 ext. 136

 


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk