Hi Aaron, thank for your reply
I use boost whit CGAL library and in the first line of my code I've a template "Is_finite":

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Arr_segment_traits_2<K>              Segment_traits_2;
typedef CGAL::Arr_polyline_traits_2<Segment_traits_2>   Traits_2;
typedef K::Point_2 Point;
typedef K::Segment_2 Segment;
typedef Traits_2::Curve_2                               Polyline;

typedef CGAL::Triangulation_vertex_base_with_id_2<K> Tvb;
typedef CGAL::Triangulation_face_base_2<K> Tfb;
typedef CGAL::Triangulation_data_structure_2<Tvb,Tfb> Tds;
typedef CGAL::Delaunay_triangulation_2<K, Tds> Triangulation;


// consider finite vertices and edges.

template <typename T>
struct Is_finite {

  const T* t_;

  Is_finite()
    : t_(NULL)
  {}

  Is_finite(const T& t)
    : t_(&t)
  { }

  template <typename VertexOrEdge>
  bool operator()(const VertexOrEdge& voe) const {
    return ! t_->is_infinite(voe);
  }
};

Best Regards
-Bombielfil-


2008/2/6, Aaron Windsor <aaron.windsor@gmail.com>:
On Feb 6, 2008 7:02 AM, BomBielFil <bombielfil@gmail.com> wrote:
> Hi
> I've a problem whit "put" function.  My simple code is:
> --------------------------
> typedef Is_finite<Triangulation> Filter;
> typedef boost::filtered_graph<Triangulation,Filter,Filter>
> Finite_triangulation;
>  typedef boost::graph_traits<Finite_triangulation>::vertex_descriptor
> vertex_descriptor;
> typedef boost::graph_traits<Finite_triangulation>::vertex_iterator
> vertex_iterator;
> typedef boost::graph_traits<Finite_triangulation>::edge_descriptor
> edge_descriptor;
>  typedef boost::graph_traits<Finite_triangulation>::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<Triangulation,boost::edge_weight_t>::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
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users