fixing tests

This commit is contained in:
Sven Oesau 2024-02-02 15:45:17 +01:00
parent 6f8b3ef55c
commit b265ee90a8
5 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@ set as the orthtree's map type, so a map does not need to be provided.
\section Section_Orthtree_Properties Properties
The Orthtree uses a mechanism to attach properties to nodes at run-time which follows \ref sectionSurfaceMesh_properties "Surface mesh properties". Each property is identified by a string and its key type and stored in a consecutive block of memory. Contrary to surface mesh the removal of properties is not supported.
Several properties are provided by default and used to maintain the data structure. The property \c "contents" keeps the data for each node. "parents" and "children" maintain the relation between nodes. "coordinates" and "depth" contain absolute positions of nodes.
Several properties are provided by default and used to maintain the data structure. The property \c "contents" keeps the data for each node. \c "parents" and \c "children" maintain the relation between nodes. \c "coordinates" and \c "depth" contain absolute positions of nodes.
\section Section_Orthtree_Traversal Traversal

View File

@ -512,7 +512,7 @@ public:
template <typename T>
std::pair<Property_map<T>, bool>
get_or_add_node_property(const std::string& name, const T default_value = T()) {
auto p = m_node_properties.template get_or_add_property(name, default_value);
auto p = m_node_properties.get_or_add_property(name, default_value);
return std::pair<Property_map<T>, bool>(Property_map<T>(p.first), p.second);
}
@ -528,7 +528,7 @@ public:
*/
template <typename T>
Property_map<T> add_node_property(const std::string& name, const T default_value = T()) {
return m_node_properties.template add_property(name, default_value);
return m_node_properties.add_property(name, default_value);
}
/*!

View File

@ -54,7 +54,7 @@ int main(void) {
// Expanding the tree; new nodes should be assigned the default value
tree.refine(10, 1);
for (auto n : tree.traverse<CGAL::Orthtrees::Preorder_traversal<typename Octree::Traits>>()) {
for (auto n : tree.traverse<CGAL::Orthtrees::Preorder_traversal<Octree>>()) {
// Everything but the root will have the default value
if (!tree.is_root(n)) assert(node_int_property[n] == 5);
}

View File

@ -15,7 +15,7 @@ using Point = Kernel::Point_3;
using FT = Kernel::FT;
using Point_set = CGAL::Point_set_3<Point>;
using Octree = CGAL::Octree<Kernel, Point_set, typename Point_set::Point_map>;
using Leaves_traversal = CGAL::Orthtrees::Leaves_traversal<typename Octree::Traits>;
using Leaves_traversal = CGAL::Orthtrees::Leaves_traversal<Octree>;
std::size_t count_jumps(Octree& octree) {

View File

@ -12,8 +12,8 @@ using Kernel = CGAL::Simple_cartesian<double>;
using Point = Kernel::Point_3;
using Point_set = CGAL::Point_set_3<Point>;
using Octree = CGAL::Octree<Kernel, Point_set, typename Point_set::Point_map>;
using Preorder_traversal = CGAL::Orthtrees::Preorder_traversal<typename Octree::Traits>;
using Level_traversal = CGAL::Orthtrees::Level_traversal<typename Octree::Traits>;
using Preorder_traversal = CGAL::Orthtrees::Preorder_traversal<Octree>;
using Level_traversal = CGAL::Orthtrees::Level_traversal<Octree>;
bool test_preorder_1_node() {