summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-09-24 13:06:54 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-09-24 13:06:54 +0000
commitd8121aa7f9d6a9c8faa4aa532162b7d4452a6c29 (patch)
tree837307c8f3bad2f3aee096fdf2161b5d0bd0aa62 /src
parent52ebc4ed1d6ffbfeddb9565aebdc099ec35f920d (diff)
There is little point obfuscating Filtration_simplex_range.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@792 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 0365c6b1612bfdde72746765774729ccb6037f44
Diffstat (limited to 'src')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index b911552d..914247b5 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -213,12 +213,12 @@ class Simplex_tree {
/** \brief Range over the simplices of the skeleton of the simplicial complex, for a given
* dimension. */
typedef boost::iterator_range<Skeleton_simplex_iterator> Skeleton_simplex_range;
+ /** \brief Range over the simplices of the simplicial complex, ordered by the filtration. */
+ typedef std::vector<Simplex_handle> Filtration_simplex_range;
/** \brief Iterator over the simplices of the simplicial complex, ordered by the filtration.
*
* 'value_type' is Simplex_handle. */
- typedef typename std::vector<Simplex_handle>::iterator Filtration_simplex_iterator;
- /** \brief Range over the simplices of the simplicial complex, ordered by the filtration. */
- typedef boost::iterator_range<Filtration_simplex_iterator> Filtration_simplex_range;
+ typedef typename Filtration_simplex_range::const_iterator Filtration_simplex_iterator;
/* @} */ // end name range and iterator types
/** \name Range and iterator methods
@@ -271,16 +271,11 @@ class Simplex_tree {
* The filtration must be valid. If the filtration has not been initialized yet, the
* method initializes it (i.e. order the simplices). If the complex has changed since the last time the filtration
* was initialized, please call `initialize_filtration()` to recompute it. */
- Filtration_simplex_range filtration_simplex_range(Indexing_tag) {
+ Filtration_simplex_range const& filtration_simplex_range(Indexing_tag=Indexing_tag()) {
if (filtration_vect_.empty()) {
initialize_filtration();
}
- return Filtration_simplex_range(filtration_vect_.begin(),
- filtration_vect_.end());
- }
-
- Filtration_simplex_range filtration_simplex_range() {
- return filtration_simplex_range(Indexing_tag());
+ return filtration_vect_;
}
/** \brief Returns a range over the vertices of a simplex.
@@ -1082,7 +1077,7 @@ class Simplex_tree {
* of the simplex, and fil is its filtration value. */
void print_hasse(std::ostream& os) {
os << num_simplices() << " " << std::endl;
- for (auto sh : filtration_simplex_range(Indexing_tag())) {
+ for (auto sh : filtration_simplex_range()) {
os << dimension(sh) << " ";
for (auto b_sh : boundary_simplex_range(sh)) {
os << key(b_sh) << " ";