Regular Triangulation- Quickly get the inserted vertex's incident vertices.

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

Regular Triangulation- Quickly get the inserted vertex's incident vertices.

Frank Dz
This post was updated on .
Hi all~ I have a question for quickly get the inserted vertex's incident
vertex. To be specific, I wanna insert one weighted point to the regular
triangulation, and I just wanna focus on this just inserted vertex and try
to figure out its incident vertices in the RT (regular triangulation).

For example, before I insert vertex A, in the regular triangulation, there
are vertices B,C,D,E,F. After insertion, A is connecting to B, C, D. Now I
want to quick get vertices: B, C, D.

I have tried two method.

1st : I use vertex handle after I insert the point. Yet vertex handle do not
provide a connecting info of this new inserted point.

2nd: I need to use iterator to first get this points and use the Edge  data
structure:

\\...
 for(RT::Vertex_iterator vit = rt.vertices_begin(); vit!= rt.vertices_end();
++vit){
      std::vector<DT::Edge> E;
      dt.incident_edges(vit,std::back_inserter(E));
\\...

The second method can solve the problem, but it is too slow. I want to know
it there exist a method it running time is almost O(c) rather than O(n) due
to a loop.

If there exist the method to get this problem solved?

Thanks for your kind help and guidance!





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

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


be open, be creative, be critical
Reply | Threaded
Open this post in threaded view
|

Re: Regular Triangulation- Quickly get the inserted vertex's incident vertices.

andreas.fabri

Hello,

A Regular_triangulation_3 is derived from Triangulation_3

where you can find he function:

https://doc.cgal.org/latest/Triangulation_3/classCGAL_1_1Triangulation__3.html#aa9814b11ee0a6e024fd3cee4cff066c3

best,

andreas


On 12/16/2019 3:25 PM, Frank Dz wrote:
Hi all~ I have a question for quickly get the inserted vertex's incident
vertex. To be specific, I wanna insert one weighted point to the regular
triangulation, and I just wanna focus on this just inserted vertex and try
to figure out its incident vertices in the RT (regular triangulation).

For example, before I insert vertex A, in the regular triangulation, there
are vertices B,C,D,E,F. After insertion, A is connecting to B, C, D. Now I
want to quick get vertices: B, C, D.

I have tried two method. 

1st : I use vertex handle after I insert the point. Yet vertex handle do not
provide a connecting info of this new inserted point.

2nd: I need to use iterator to first get this points and use the Edge  data
structure:

\\...
 for(RT::Vertex_iterator vit = rt.vertices_begin(); vit!= rt.vertices_end();
++vit){
      std::vector<DT::Edge> E;
      dt.incident_edges(vit,std::back_inserter(E));
\\...

If there exist the method to get this problem solved?

Thanks for your kind help and guidance!





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

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

phone: +33.492.954.912    skype: andreas.fabri