summaryrefslogtreecommitdiff
path: root/src/Simplex_tree
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-06-25 09:40:23 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-06-25 09:40:23 +0000
commit14bf2f4f33d3f34d946777ac7bbb389fe1f987a2 (patch)
tree91da2a99f62489bbd22b9a204ee0f4484e54528d /src/Simplex_tree
parented8ae292df7b486b71f573431e17e3466a0a2ace (diff)
parent540b437fbc207a980ab5cb7945f1a6d42aab40a7 (diff)
trunk constify-ST backmerge
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@645 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 6c1ea7e8c04d3ff45c3ba13d0d56a6b2c06b4558
Diffstat (limited to 'src/Simplex_tree')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index 9a06b262..5239c859 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -327,7 +327,7 @@ class Simplex_tree {
/** \brief Returns the filtration value of a simplex.
*
* Called on the null_simplex, returns INFINITY. */
- Filtration_value filtration(Simplex_handle sh) {
+ Filtration_value filtration(Simplex_handle sh) const {
if (sh != null_simplex()) {
return sh->second.filtration();
} else {
@@ -345,7 +345,7 @@ class Simplex_tree {
}
/** \brief Returns an upper bound of the filtration values of the simplices. */
- Filtration_value filtration() {
+ Filtration_value filtration() const {
return threshold_;
}
@@ -353,31 +353,31 @@ class Simplex_tree {
* associated to the simplices in the simplicial complex.
*
* One can call filtration(null_simplex()). */
- Simplex_handle null_simplex() {
+ Simplex_handle null_simplex() const {
return Dictionary_it(NULL);
}
/** \brief Returns a key different for all keys associated to the
* simplices of the simplicial complex. */
- Simplex_key null_key() {
+ Simplex_key null_key() const {
return -1;
}
/** \brief Returns a Vertex_handle different from all Vertex_handles associated
* to the vertices of the simplicial complex. */
- Vertex_handle null_vertex() {
+ Vertex_handle null_vertex() const {
return null_vertex_;
}
/** \brief Returns the number of vertices in the complex. */
- size_t num_vertices() {
+ size_t num_vertices() const {
return root_.members_.size();
}
/** \brief Returns the number of simplices in the complex.
*
* Does not count the empty simplex. */
- const unsigned int& num_simplices() const {
+ unsigned int num_simplices() const {
return num_simplices_;
}
@@ -395,13 +395,13 @@ class Simplex_tree {
}
/** \brief Returns an upper bound on the dimension of the simplicial complex. */
- int dimension() {
+ int dimension() const {
return dimension_;
}
/** \brief Returns true iff the node in the simplex tree pointed by
* sh has children.*/
- bool has_children(Simplex_handle sh) {
+ bool has_children(Simplex_handle sh) const {
return (sh->second.children()->parent() == sh->first);
}
@@ -571,7 +571,7 @@ class Simplex_tree {
}
/** Set a number of simplices for the simplicial complex. */
- void set_num_simplices(const unsigned int& num_simplices) {
+ void set_num_simplices(unsigned int num_simplices) {
num_simplices_ = num_simplices;
}
@@ -783,10 +783,10 @@ class Simplex_tree {
/** \brief Intersects Dictionary 1 [begin1;end1) with Dictionary 2 [begin2,end2)
* and assigns the maximal possible Filtration_value to the Nodes. */
- void intersection(std::vector<std::pair<Vertex_handle, Node> >& intersection,
- Dictionary_it begin1, Dictionary_it end1,
- Dictionary_it begin2, Dictionary_it end2,
- Filtration_value filtration) {
+ static void intersection(std::vector<std::pair<Vertex_handle, Node> >& intersection,
+ Dictionary_it begin1, Dictionary_it end1,
+ Dictionary_it begin2, Dictionary_it end2,
+ Filtration_value filtration) {
if (begin1 == end1 || begin2 == end2)
return; // ----->>
while (true) {
@@ -814,8 +814,8 @@ class Simplex_tree {
}
/** Maximum over 3 values.*/
- Filtration_value maximum(Filtration_value a, Filtration_value b,
- Filtration_value c) {
+ static Filtration_value maximum(Filtration_value a, Filtration_value b,
+ Filtration_value c) {
Filtration_value max = (a < b) ? b : a;
return ((max < c) ? c : max);
}