On Feb 6, 2008 7:02 AM, BomBielFil
Hi I've a problem whit "put" function. My simple code is: -------------------------- typedef Is_finite<Triangulation> Filter; typedef boost::filtered_graph
Finite_triangulation; typedef boost::graph_traits ::vertex_descriptor vertex_descriptor; typedef boost::graph_traits ::vertex_iterator vertex_iterator; typedef boost::graph_traits ::edge_descriptor edge_descriptor; typedef boost::graph_traits ::edge_iterator edge_iterator; int main(int,char*[]) { Triangulation t; Filter is_finite(t); Finite_triangulation ft(t, is_finite, is_finite); //graph
t.insert(Point(0.4, 1)); t.insert(Point(1, 0.3)); t.insert(Point(0.0, -0.9)); t.insert(Point(-1, 0)); t.insert(Point(1, 2));
boost::property_map
::type weight_map=get(boost::edge_weight,ft); edge_iterator eit,eend; for (boost::tie(eit,eend)=boost::edges(ft); eit!=eend; ++eit) { std::cout << "PESO: " << get(weight_map,*eit) << "\n"; put(weight_map,*eit ,100); std::cout << "PESO2: " << get(weight_map,*eit) << "\n"; } return 0; } ------
at compile time I've: "/property_map.hpp:319: error: invalid lvalue in assignment" Why get is right and put no??Can help me??
Hi, What is your typedef for Triangulation? And what is the definition of Is_finite? I'd like to try to recreate this so I can see what's wrong. Regards, Aaron