Skip to Content.
Sympa Menu

cgal-discuss - RE: [cgal-discuss] advice about CGAL Delaunay Triangulation

Subject: CGAL users discussion list

List archive

RE: [cgal-discuss] advice about CGAL Delaunay Triangulation


Chronological Thread 
  • From: Kwok Jasper <>
  • To: <>
  • Subject: RE: [cgal-discuss] advice about CGAL Delaunay Triangulation
  • Date: Tue, 3 Feb 2009 12:54:47 +0800
  • Importance: Normal

Thank you.

I have tried the main roultine you suggested to me.
it didn't get run out of memory

In my code, I am using std::list<finite_facets_itr> inside the function

void SamplePointSet::improve_triangulation()

After that, in the function
void SamplePointSet::check_for_voronoi_edge(list<finite_facets_itr>& temp)

I use

temp_triangle = Tr.triangle(*(*current_facet));

to retrieve the triangular face for each of the facet stored in the list.


May I ask if it is possible that the running out of the memory is due to the fact that I used too many
data structure to store the information about the 362272 data points?

In fact in my whole program, in addition to using

list<facet_iterator>

I also used some other data structure to store some other information about those points inserted into the Triangulation
Is that it is not advisable to use more than 3 or 4 of such data structure as the number of points is huge ?

Thank you very much


> Date: Mon, 2 Feb 2009 16:18:33 +0100
> From:
> To:
> Subject: Re: [cgal-discuss] advice about CGAL Delaunay Triangulation
>
>
> If you have this
>
> main()
> {
> finite_facets_itr it = tr.finite_faces_begin();
> std::list<finite_facets_itr> facets;
>
> for(int i=0; true; i++){
> std::cout << "i = " << i << std::endl;
> facets.push_back(it);
> }
> }
>
> do you then also run out of memory quickly?
>
>
> Concerning your code, I only searched for finite_facets_itr
>
> I am wondering if you really want a std::list<finite_facets_itr>,
> or if you want a std::list<Facet>.
>
> After all you don't want to iterate.
>
>
> andreas
>
>
>
> Kwok Jasper wrote:
> > Thank you very much.
> >
> > The code I pasted in the email before work with some data structure I
> > defined.
> > Tohave the whole code wroking to test, may I attach the whole cpp files
> > here?
> >
> > Thank you very much for your help.
> >
> > > Date: Mon, 2 Feb 2009 15:51:19 +0100
> > > From:
> > > To:
> > > Subject: Re: [cgal-discuss] advice about CGAL Delaunay Triangulation
> > >
> > >
> > > Your code looks ok, and your machine has as much RAM as mine.
> > >
> > > I guess you have to come up with a minimal code example
> > > so that we can give it a try.
> > >
> > > andreas
> > >
> > >
> > > Kwok Jasper wrote:
> > > > Thank you
> > > >
> > > > The code I am using is as follows
> > > >
> > > >
> > > > typedef CGAL::Delaunay_triangulation_3<K1> Triangulations;
> > > > typedef Triangulations::Point Point_tr;
> > > > typedef Triangula tions::Facet Facet;
> > > > typedef Triangulations::Finite_facets_iterator finite_facets_itr;
> > > > typedef Triangulations::Triangle Triangle;
> > > >
> > > > list<finite_facets_itr> temp;
> > > > Triangle temp_triangle;
> > > > double temp_circumradius = 0;
> > > > double temp_max_inter_vertice_dist;
> > > >
> > > > finite_facets_itr starting_facet = Tr.finite_facets_begin();
> > > > finite_facets_itr ending_facet = Tr.finite_facets_end();
> > > > finite_facets_itr current_facet = starting_facet;
> > > >
> > > > for(current_facet = starting_facet; current_facet != ending_facet;
> > > > ++current_facet)
> > > > {
> > > > temp_triangle = Tr.tri angle(*current_facet);
> > > >
> > > > if ( .......)
> > > > {
> > > > temp.push_back(current_facet);
> > > > }
> > > > }
> > > >
> > > >
> > > > And I have attached in this email about the configuration of the
> > machine
> > > > I am using.
> > > >
> > > > Thank you very much
> > > >
> > > >
> > > >
> > > > > Date: Mon, 2 Feb 2009 15:09:11 +0100
> > > > > From:
> > > > > To:
> > > > > Subject: Re: [cgal-discuss] advice about CGAL Delaunay Triangulation
> > > > >
> > > > >
> > > > > Jasper,
> > > > >
> > > > > The limitation of the std::list should be the virtual memory.
> > > > >
> > > > > Concerning the Finite_faces_iterator, are you sure not
> > > > > to forget to increment the iterator?
> > > > >
> > > > > Can you send us the code of your loop.
> > > > >
> > > > >
> > > > > < br>> I would be glad to know the configu ration of your machine.
> > > > >
> > > > > As you are on Windows, could you go to Start -> Control Panel ->
> > System
> > > > > and then tell us what is written in the tab 'General".
> > > > >
> > > > > On my machine I see
> > > > >
> > > > > System:
> > > > > Microsoft Windows XP
> > > > > ...
> > > > >
> > > > > Registered to:
> > > > > ...
> > > > >
> > > > > Computer:
> > > > > AMD Turion
> > > > > ML 40
> > > > > 2.19 GHz, 896 MB of RAM.
> > > > >
> > > > >
> > > > > What is written there on your computer?
> > > > >
> > > > > andreas
> > > > >
> > > > >
> > > > >
> > > > > Kwok Jasper wrote:
> > > > > > Excuse me, may I seek for some advise about using the Delaunay
> > > > > > Triangulation?
> > > > > &g t;
> > > > > > If I have the Delaunay Triangulation declared as follows
> > > > > >
> > > > > >
> > > > > > typedef CGAL::Exact_predicates_inexact_constructions_kernel K1;
> > > > > > typedef CGAL::Delaunay_triangulation_3<K1> Triangulat ions;
> > > > > >
> > > > > >
> > > > > > After I have inserted several ten thousand points into the
> > > > > > triangulation, I use the Finite_facets_iterator to iterate over
> > all of
> > > > > > the triangular faces in the triangulation.
> > > > > > For each of the triangular face, I check for some condition and if
> > > > they
> > > > > > satify the condition, I push then into a
> > > > std::list<Finite_facets_iterator>
> > > > > >
> > > > > > However, when I use the std::list<Finite_facets_iterator> to
> > store all
> > > > > > those tr iangular face, I get the exception saying that memory
> > for the
> > > > > > program is used up.
> > > > > > May I ask if it is that for huge number of points inserted into the
> > > > > > Delaunay Triangulation, it is not recommended to use std::list or
> > > > > > std::vector to store the above information?
> > > > > >
> > > > > > If it is not recommended, what structure may I use for the storage.
> > > > > >
> > > > > > ; Thank you very much.
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > 收發郵件以外 - 了解更多Windows Live™卓越功能 收發郵件以外更多功能
> > > > > > <http://www.microsoft.com/windows/windowslive/>
> > > > >
> > > > > --
> > > > > You are currently subscribed to cgal-discuss.
> > > > > To unsubscribe or access the archives, go to
> > > > > https://lists-sop.inria.fr/wws/info/cgal-discuss
> > > >
> > > >
> > ------------------------------------------------------------------------
> > > > 收發郵件以外 - 了解更多Windows Live™卓越功能 收發郵件以外更多功能
> > > > <http://www.microsoft.com/windows/windowslive/>
> > > >
> > ------------------------------------------------------------------------
> > > >
> > >
> > > --
> > > You are currently subscribed to cgal-discuss.
> > > To unsubscribe or access the archives, go to
> > > https://lists-sop.inria.fr/wws/info/cgal-discuss
> >
> > ------------------------------------------------------------------------
> >
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss


人與人之間的距離只有一指之隔。



Archive powered by MHonArc 2.6.16.

Top of Page