diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2019-05-10 12:37:48 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2019-05-10 12:37:48 +0200 |
commit | 27114ca8df752b4ddd24f0ebf161f46882e352df (patch) | |
tree | ad3be60d9a438499cc0c0d3c165c99510d2b9a7c /src/Witness_complex/include/gudhi | |
parent | a33d17ebb1a5f7c830ee155ec2733a0f48211010 (diff) |
Clarify doc of witness complex
Diffstat (limited to 'src/Witness_complex/include/gudhi')
-rw-r--r-- | src/Witness_complex/include/gudhi/Strong_witness_complex.h | 4 | ||||
-rw-r--r-- | src/Witness_complex/include/gudhi/Witness_complex.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h index fd6b3f38..5fd116b9 100644 --- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h @@ -40,10 +40,10 @@ namespace witness_complex { * \brief Constructs strong witness complex for a given table of nearest landmarks with respect to witnesses. * \ingroup witness_complex * - * \tparam Nearest_landmark_table_ needs to be a range of a range of pairs of nearest landmarks and distances. + * \tparam Nearest_landmark_table_ needs to be a range (one entry per witness) of sorted ranges of pairs of nearest landmarks and distances. * The class Nearest_landmark_table_::value_type must be a copiable range. * The range of pairs must admit a member type 'iterator'. The dereference type - * of the pair range iterator needs to be 'std::pair<std::size_t, double>'. + * of the pair range iterator needs to be 'std::pair<std::size_t, double>' where the first element is the index of the landmark, and the second its (squared) distance to the witness. */ template< class Nearest_landmark_table_ > class Strong_witness_complex { diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 67885258..4063e040 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -75,10 +75,10 @@ class Witness_complex { /** * \brief Initializes member variables before constructing simplicial complex. * \details Records nearest landmark table. - * @param[in] nearest_landmark_table needs to be a range of a range of pairs of nearest landmarks and distances. + * @param[in] nearest_landmark_table needs to be a range (one entry per witness) of sorted ranges of pairs of nearest landmarks and distances. * The class Nearest_landmark_table_::value_type must be a copiable range. * The range of pairs must admit a member type 'iterator'. The dereference type - * of the pair range iterator needs to be 'std::pair<std::size_t, double>'. + * of the pair range iterator needs to be 'std::pair<std::size_t, double>' where the first element is the index of the landmark, and the second its (squared) distance to the witness. */ Witness_complex(Nearest_landmark_table_ const & nearest_landmark_table) @@ -108,8 +108,8 @@ class Witness_complex { } ActiveWitnessList active_witnesses; Landmark_id k = 0; /* current dimension in iterative construction */ - for (auto w : nearest_landmark_table_) - active_witnesses.push_back(ActiveWitness(w)); + for (auto&& w : nearest_landmark_table_) + active_witnesses.emplace_back(w); while (!active_witnesses.empty() && k <= limit_dimension) { typename ActiveWitnessList::iterator aw_it = active_witnesses.begin(); std::vector<Landmark_id> simplex; |