mirror of https://github.com/CGAL/cgal
fixes for ci
This commit is contained in:
parent
6e7587a863
commit
3f361a4eda
|
|
@ -220,22 +220,22 @@ public:
|
||||||
Orthtree(const Orthtree& other) :
|
Orthtree(const Orthtree& other) :
|
||||||
m_traits(other.m_traits),
|
m_traits(other.m_traits),
|
||||||
m_node_properties(other.m_node_properties),
|
m_node_properties(other.m_node_properties),
|
||||||
m_node_contents(m_node_properties.get_property<Node_data>("contents")),
|
m_node_contents(m_node_properties.template get_property<Node_data>("contents")),
|
||||||
m_node_depths(m_node_properties.get_property<std::uint8_t>("depths")),
|
m_node_depths(m_node_properties.template get_property<std::uint8_t>("depths")),
|
||||||
m_node_coordinates(m_node_properties.get_property<Global_coordinates>("coordinates")),
|
m_node_coordinates(m_node_properties.template get_property<Global_coordinates>("coordinates")),
|
||||||
m_node_parents(m_node_properties.get_property<std::optional<Node_index>>("parents")),
|
m_node_parents(m_node_properties.template get_property<std::optional<Node_index>>("parents")),
|
||||||
m_node_children(m_node_properties.get_property<std::optional<Node_index>>("children")),
|
m_node_children(m_node_properties.template get_property<std::optional<Node_index>>("children")),
|
||||||
m_bbox(other.m_bbox), m_side_per_depth(other.m_side_per_depth) {}
|
m_bbox(other.m_bbox), m_side_per_depth(other.m_side_per_depth) {}
|
||||||
|
|
||||||
// move constructor
|
// move constructor
|
||||||
Orthtree(Orthtree&& other) :
|
Orthtree(Orthtree&& other) :
|
||||||
m_traits(other.m_traits),
|
m_traits(other.m_traits),
|
||||||
m_node_properties(std::move(other.m_node_properties)),
|
m_node_properties(std::move(other.m_node_properties)),
|
||||||
m_node_contents(m_node_properties.get_property<Node_data>("contents")),
|
m_node_contents(m_node_properties.template get_property<Node_data>("contents")),
|
||||||
m_node_depths(m_node_properties.get_property<std::uint8_t>("depths")),
|
m_node_depths(m_node_properties.template get_property<std::uint8_t>("depths")),
|
||||||
m_node_coordinates(m_node_properties.get_property<Global_coordinates>("coordinates")),
|
m_node_coordinates(m_node_properties.template get_property<Global_coordinates>("coordinates")),
|
||||||
m_node_parents(m_node_properties.get_property<std::optional<Node_index>>("parents")),
|
m_node_parents(m_node_properties.template get_property<std::optional<Node_index>>("parents")),
|
||||||
m_node_children(m_node_properties.get_property<std::optional<Node_index>>("children")),
|
m_node_children(m_node_properties.template get_property<std::optional<Node_index>>("children")),
|
||||||
m_bbox(other.m_bbox), m_side_per_depth(other.m_side_per_depth)
|
m_bbox(other.m_bbox), m_side_per_depth(other.m_side_per_depth)
|
||||||
{
|
{
|
||||||
// todo: makes sure moved-from is still valid. Maybe this shouldn't be necessary.
|
// todo: makes sure moved-from is still valid. Maybe this shouldn't be necessary.
|
||||||
|
|
@ -482,7 +482,7 @@ public:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
std::pair<Property_map<T>, bool>
|
std::pair<Property_map<T>, bool>
|
||||||
get_or_add_node_property(const std::string& name, const T default_value = T()) {
|
get_or_add_node_property(const std::string& name, const T default_value = T()) {
|
||||||
auto p = m_node_properties.get_or_add_property(name, default_value);
|
auto p = m_node_properties.template get_or_add_property(name, default_value);
|
||||||
return std::pair<Property_map<T>, bool>(Property_map<T>(p.first), p.second);
|
return std::pair<Property_map<T>, bool>(Property_map<T>(p.first), p.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -498,7 +498,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Property_map<T> add_node_property(const std::string& name, const T default_value = T()) {
|
Property_map<T> add_node_property(const std::string& name, const T default_value = T()) {
|
||||||
return m_node_properties.add_property(name, default_value);
|
return m_node_properties.template add_property(name, default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -514,7 +514,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Property_map<T> get_node_property(const std::string& name) {
|
Property_map<T> get_node_property(const std::string& name) {
|
||||||
return m_node_properties.get_property<T>(name);
|
return m_node_properties.template get_property<T>(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -529,7 +529,7 @@ public:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
std::optional<Property_map<T>>
|
std::optional<Property_map<T>>
|
||||||
get_node_property_if_exists(const std::string& name) {
|
get_node_property_if_exists(const std::string& name) {
|
||||||
auto p = m_node_properties.get_property_if_exists<T>(name);
|
auto p = m_node_properties.template get_property_if_exists<T>(name);
|
||||||
if (p)
|
if (p)
|
||||||
return std::optional<Property_map<T> >(Property_map<T>(*p));
|
return std::optional<Property_map<T> >(Property_map<T>(*p));
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,13 @@ template <typename GeomTraits>
|
||||||
struct Preorder_traversal {
|
struct Preorder_traversal {
|
||||||
private:
|
private:
|
||||||
|
|
||||||
const Orthtree<GeomTraits>& m_orthtree;
|
const CGAL::Orthtree<GeomTraits>& m_orthtree;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
using Node_index = typename GeomTraits::Node_index;
|
using Node_index = typename GeomTraits::Node_index;
|
||||||
|
|
||||||
Preorder_traversal(const Orthtree<GeomTraits>& orthtree) : m_orthtree(orthtree) {}
|
Preorder_traversal(const CGAL::Orthtree<GeomTraits>& orthtree) : m_orthtree(orthtree) {}
|
||||||
|
|
||||||
Node_index first_index() const {
|
Node_index first_index() const {
|
||||||
return m_orthtree.root();
|
return m_orthtree.root();
|
||||||
|
|
@ -82,13 +82,13 @@ template <typename GeomTraits>
|
||||||
struct Postorder_traversal {
|
struct Postorder_traversal {
|
||||||
private:
|
private:
|
||||||
|
|
||||||
const Orthtree<GeomTraits>& m_orthtree;
|
const CGAL::Orthtree<GeomTraits>& m_orthtree;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
using Node_index = typename GeomTraits::Node_index;
|
using Node_index = typename GeomTraits::Node_index;
|
||||||
|
|
||||||
Postorder_traversal(const Orthtree<GeomTraits>& orthtree) : m_orthtree(orthtree) {}
|
Postorder_traversal(const CGAL::Orthtree<GeomTraits>& orthtree) : m_orthtree(orthtree) {}
|
||||||
|
|
||||||
Node_index first_index() const {
|
Node_index first_index() const {
|
||||||
return m_orthtree.deepest_first_child(m_orthtree.root());
|
return m_orthtree.deepest_first_child(m_orthtree.root());
|
||||||
|
|
@ -113,13 +113,13 @@ template <typename GeomTraits>
|
||||||
struct Leaves_traversal {
|
struct Leaves_traversal {
|
||||||
private:
|
private:
|
||||||
|
|
||||||
const Orthtree<GeomTraits>& m_orthtree;
|
const CGAL::Orthtree<GeomTraits>& m_orthtree;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
using Node_index = typename GeomTraits::Node_index;
|
using Node_index = typename GeomTraits::Node_index;
|
||||||
|
|
||||||
Leaves_traversal(const Orthtree<GeomTraits>& orthtree) : m_orthtree(orthtree) {}
|
Leaves_traversal(const CGAL::Orthtree<GeomTraits>& orthtree) : m_orthtree(orthtree) {}
|
||||||
|
|
||||||
Node_index first_index() const {
|
Node_index first_index() const {
|
||||||
return m_orthtree.deepest_first_child(m_orthtree.root());
|
return m_orthtree.deepest_first_child(m_orthtree.root());
|
||||||
|
|
@ -153,7 +153,7 @@ template <typename GeomTraits>
|
||||||
struct Level_traversal {
|
struct Level_traversal {
|
||||||
private:
|
private:
|
||||||
|
|
||||||
const Orthtree<GeomTraits>& m_orthtree;
|
const CGAL::Orthtree<GeomTraits>& m_orthtree;
|
||||||
const std::size_t m_depth;
|
const std::size_t m_depth;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -163,7 +163,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
constructs a `depth`-level traversal.
|
constructs a `depth`-level traversal.
|
||||||
*/
|
*/
|
||||||
Level_traversal(const Orthtree<GeomTraits>& orthtree, std::size_t depth) : m_orthtree(orthtree), m_depth(depth) {}
|
Level_traversal(const CGAL::Orthtree<GeomTraits>& orthtree, std::size_t depth) : m_orthtree(orthtree), m_depth(depth) {}
|
||||||
|
|
||||||
Node_index first_index() const {
|
Node_index first_index() const {
|
||||||
// assumes the tree has at least one child at m_depth
|
// assumes the tree has at least one child at m_depth
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
auto get_squared_distance_of_element_object() const {
|
auto get_squared_distance_of_element_object() const {
|
||||||
return [&](const Node_data_element& index, const Point_d& point) -> typename FT {
|
return [&](const Node_data_element& index, const typename Self::Point_d& point) -> typename FT {
|
||||||
return CGAL::squared_distance(get(m_point_map, index), point);
|
return CGAL::squared_distance(get(m_point_map, index), point);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue