Subject: CGAL users discussion list
List archive
- From: Philipp Moeller <>
- To:
- Subject: Re: [cgal-discuss] Problems updating Poin_d's memebers
- Date: Thu, 03 May 2012 15:16:40 +0200
- Organization: GeometryFactory
luchia
<>
writes:
> Hallo,
>
> Let assume p = (p_0, ..., p_k) be a point of type CGAL::Point_d<Kernel> with
>
> typedef CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float>>
> Ntype;
> typedef CGAL::Cartesian_d<Ntype>
> Kernel;
>
> Now let assume I want to change the 0<= i-th<= k cartesian coordinate of p.
> So I perform:
>
> p[i] = new_data;
>
> The question is: why the above statement has no effect on p[i]? I mean, why
> after the assignment statment, the value of p[i] does not change? How is
> possible
> to access and modify the members of an object of type Point_d?
All CGAL objects are immutable. A statement like p[i] = new_data; should
result in a compile time error. This could be a bug in Kernel_d. (Which
compiler are you using?)
To assign a new value, just assign a new Point_d object to the old one.
HTH,
Philipp Moeller
GeometryFactory
- [cgal-discuss] Problems updating Poin_d's memebers, luchia, 05/03/2012
- Re: [cgal-discuss] Problems updating Poin_d's memebers, Philipp Moeller, 05/03/2012
- [cgal-discuss] Re: Problems updating Poin_d's memebers, luchia, 05/03/2012
- Re: [cgal-discuss] Re: Problems updating Poin_d's memebers, Philipp Moeller, 05/03/2012
- Re: [cgal-discuss] Re: Problems updating Poin_d's memebers, Marc Glisse, 05/03/2012
- Re: [cgal-discuss] Re: Problems updating Poin_d's memebers, Philipp Moeller, 05/04/2012
- Re: [cgal-discuss] Re: Problems updating Poin_d's memebers, Marc Glisse, 05/03/2012
- Re: [cgal-discuss] Re: Problems updating Poin_d's memebers, Philipp Moeller, 05/03/2012
- [cgal-discuss] Re: Problems updating Poin_d's memebers, luchia, 05/03/2012
- Re: [cgal-discuss] Problems updating Poin_d's memebers, Philipp Moeller, 05/03/2012
Archive powered by MHonArc 2.6.16.