Fwd: Re: CGAL::cpp11::next(vb,ve)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: CGAL::cpp11::next(vb,ve)

andreas.fabri




-------- Forwarded Message --------
Subject: Re: [cgal-discuss] CGAL::cpp11::next(vb,ve)
Date: Fri, 11 May 2018 10:30:28 +0200
From: Andreas Fabri [hidden email]
To: iampriyanshi [hidden email]



It applies 47 times  operator++  to the iterator.


andreas


On 5/11/2018 10:23 AM, iampriyanshi wrote:
What does the below statement do?
*CGAL::cpp11::next(vb, 47)

where 
typedef boost::graph_traits<Polyhedron>::vertex_iterator              
vertex_iterartor 
vertex_iterator vb;

Code:
https://doc.cgal.org/latest/Surface_mesh_deformation/Surface_mesh_deformation_2k_ring_roi_translate_rotate_example_8cpp-example.html



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: CGAL::cpp11::next(vb,ve)

iampriyanshi
Also
what does    "boost::tie(vb,ve) = vertices(mesh) " do?
where mesh is a Polyhedron
typedef CGAL::Simple_cartesian<double>                                   Kernel;
typedef CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_with_id_3>  Polyhedron;



On Fri, May 11, 2018 at 3:10 PM, Andreas Fabri <[hidden email]> wrote:




-------- Forwarded Message --------
Subject: Re: [cgal-discuss] CGAL::cpp11::next(vb,ve)
Date: Fri, 11 May 2018 10:30:28 +0200
From: Andreas Fabri [hidden email]
To: iampriyanshi [hidden email]



It applies 47 times  operator++  to the iterator.


andreas


On 5/11/2018 10:23 AM, iampriyanshi wrote:
What does the below statement do?
*CGAL::cpp11::next(vb, 47)

where 
typedef boost::graph_traits<Polyhedron>::vertex_iterator              
vertex_iterartor 
vertex_iterator vb;

Code:
https://doc.cgal.org/latest/Surface_mesh_deformation/Surface_mesh_deformation_2k_ring_roi_translate_rotate_example_8cpp-example.html



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




--

Kind regards,

PRIYANSHI

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: CGAL::cpp11::next(vb,ve)

andreas.fabri


As it is boost::tie looking up the documentation might help.

vertices() returns a std::pair

boost::tie  takes first and second out of the pair and ties it to the two variables.

It is in fact more general, that is it works for any tuple.

andreas


On 5/11/2018 12:00 PM, Priyanshi Kumari wrote:
Also
what does    "boost::tie(vb,ve) = vertices(mesh) " do?
where mesh is a Polyhedron
typedef CGAL::Simple_cartesian<double>                                   Kernel;
typedef CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_with_id_3>  Polyhedron;



On Fri, May 11, 2018 at 3:10 PM, Andreas Fabri <[hidden email]> wrote:




-------- Forwarded Message --------
Subject: Re: [cgal-discuss] CGAL::cpp11::next(vb,ve)
Date: Fri, 11 May 2018 10:30:28 +0200
From: Andreas Fabri [hidden email]
To: iampriyanshi [hidden email]



It applies 47 times  operator++  to the iterator.


andreas


On 5/11/2018 10:23 AM, iampriyanshi wrote:
What does the below statement do?
*CGAL::cpp11::next(vb, 47)

where 
typedef boost::graph_traits<Polyhedron>::vertex_iterator              
vertex_iterartor 
vertex_iterator vb;

Code:
https://doc.cgal.org/latest/Surface_mesh_deformation/Surface_mesh_deformation_2k_ring_roi_translate_rotate_example_8cpp-example.html



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




--

Kind regards,

PRIYANSHI


-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: CGAL::cpp11::next(vb,ve)

iampriyanshi
Thanks

On Fri, May 11, 2018 at 3:38 PM, Andreas Fabri <[hidden email]> wrote:


As it is boost::tie looking up the documentation might help.

vertices() returns a std::pair

boost::tie  takes first and second out of the pair and ties it to the two variables.

It is in fact more general, that is it works for any tuple.

andreas


On 5/11/2018 12:00 PM, Priyanshi Kumari wrote:
Also
what does    "boost::tie(vb,ve) = vertices(mesh) " do?
where mesh is a Polyhedron
typedef CGAL::Simple_cartesian<double>                                   Kernel;
typedef CGAL::Polyhedron_3<Kernel,CGAL::Polyhedron_items_with_id_3>  Polyhedron;



On Fri, May 11, 2018 at 3:10 PM, Andreas Fabri <[hidden email]> wrote:




-------- Forwarded Message --------
Subject: Re: [cgal-discuss] CGAL::cpp11::next(vb,ve)
Date: Fri, 11 May 2018 10:30:28 +0200
From: Andreas Fabri [hidden email]
To: iampriyanshi [hidden email]



It applies 47 times  operator++  to the iterator.


andreas


On 5/11/2018 10:23 AM, iampriyanshi wrote:
What does the below statement do?
*CGAL::cpp11::next(vb, 47)

where 
typedef boost::graph_traits<Polyhedron>::vertex_iterator              
vertex_iterartor 
vertex_iterator vb;

Code:
https://doc.cgal.org/latest/Surface_mesh_deformation/Surface_mesh_deformation_2k_ring_roi_translate_rotate_example_8cpp-example.html



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




--

Kind regards,

PRIYANSHI


-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri



--

Kind regards,

PRIYANSHI