summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h2
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index b32b525b..51c39801 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -288,7 +288,7 @@ class Simplex_tree {
/** \brief Copy; copy the whole tree structure. */
Simplex_tree(Simplex_tree& copy) : null_vertex_(copy.null_vertex_),
threshold_(copy.threshold_),
- root_(NULL, -1, std::vector<std::pair<Vertex_handle, Node>> (copy.root_.members().begin(), copy.root_.members().end())),
+ root_(NULL, -1, copy.root_.members()),
filtration_vect_(copy.filtration_vect_),
dimension_(copy.dimension_) {
rec_copy(&root_, &copy.root_);
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h
index de350f2d..b9f8dcc1 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h
@@ -71,15 +71,16 @@ class Simplex_tree_siblings {
/* \brief Constructor with initialized set of members.
*
* 'members' must be sorted and unique.*/
+ template<typename RandomAccessVertexRange>
Simplex_tree_siblings(Simplex_tree_siblings * oncles, Vertex_handle parent,
- const std::vector<std::pair<Vertex_handle, Node> > & members)
+ RandomAccessVertexRange members)
: oncles_(oncles),
parent_(parent),
members_(boost::container::ordered_unique_range, members.begin(),
members.end()) {
for (auto& map_el : members_) {
map_el.second.assign_children(this);
- }
+ }
}
/*