Commit Graph

16 Commits

Author SHA1 Message Date
Laurent Rineau 8993817d9d Time_stamper uses an atomic counter 2018-10-03 17:33:45 +02:00
Sébastien Loriot 8cdfad0d08 add missing URL and Id tags 2017-11-15 22:58:57 +01:00
Sébastien Loriot 0698f79aff add SPDX identifier for files under the LGPL-3+ license 2017-11-12 10:17:50 +01:00
Laurent Rineau 74640e8893 The time stamp of the default-constructed CC_iterator can not be 0
`0` is a valid time stamp: that is the time stamp of the first created
`Vertex` or `Cell` of the `TDS_3`. Use the maximal `size_t` instead.
2017-05-31 10:24:38 +02:00
Laurent Rineau 81dccb7d22 Add a macro CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP
That macro allows to store the time stamp in the `CC_iterator` (the type
of handle for the triangulation vertices and cells), and check that
handle and pointee have the same time stamp.
2017-05-18 10:57:13 +02:00
Laurent Rineau 6055d226b1 Add an assertion
The assertion checks that two vertex handles have the same time stamp if
and only if they have the same address.
2017-05-18 10:57:13 +02:00
Laurent Rineau e294cd8fe9 Fix new (recycled) time stamps when a TDS is copied 2017-05-18 10:57:13 +02:00
Laurent Rineau 0757cfaeb0 Re-use existing time stamps
When a `Vertex` or a `Cell` is recycled by the `Compact_container`,
re-use the existing time stamp instead of increment it. That will avoid
that the pointee of a handle has a changing timestamp.
2017-05-18 10:57:13 +02:00
Laurent Rineau cb5b3acf98 Class Compare_handles_with_or_without_timestamps to replace hacks
Previously, each file was using its own implementation of the "compare
handle" function object. This commits adds a new class
`Compare_handles_with_or_without_timestamps` that checks the presence of
`Has_timestamp` in the pointed type, and provides a different
`operator()` depending on that.
2017-03-01 12:08:52 +01:00
Andreas Fabri ca6a306815 Rename TimeStamper::key() to hash_value() and let it return a size_t 2016-04-19 17:03:52 +02:00
Laurent Rineau 9176624834 Restore the determinism of Mesh_3
Note that, by default, `Triangulation_3::remove` is not deterministic:
it iterates on a `std::map` (or a `boost::unordered_map`) where the key
type is a triple of vertex handles: the order of that iteration depends
on the comparison (or hashing) of pointers.
2016-04-19 13:56:07 +02:00
Laurent Rineau 333854f38a Fix the license of two files
Trivial fix for master.
2014-07-31 16:19:05 +02:00
Sébastien Loriot 2d14739716 additional fixes for Combinatorial map package 2014-05-21 18:47:33 +02:00
Sébastien Loriot 1bffc44ed4 factorize the mecanism to define the time stamper in a container 2014-05-21 16:30:32 +02:00
Sébastien Loriot c6fa3f4a3a add missing namespace 2014-05-21 12:51:20 +02:00
Sébastien Loriot 82f9a83e2d move the Time stamper into a separate file 2014-05-21 12:20:50 +02:00