summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-06-18 08:33:57 +0000
committeranmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-06-18 08:33:57 +0000
commit7a8800cd5b94201cba53458897cad23856e3d3ee (patch)
treed0680d7eebf4ebdccd61818315d4484dc1f1eb41
parent6969ac7694dcbc859a770c9eccf997e64e08fff3 (diff)
Fix : name of parameters and functions
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/coface@622 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 15c8419159a268dcb5b8bbfa63fb01adc8851905
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h18
-rw-r--r--src/Simplex_tree/test/simplex_tree_unit_test.cpp4
2 files changed, 11 insertions, 11 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index 26a8eba6..eb423082 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -627,7 +627,7 @@ private:
curr_res->push_back(sib->first);
bool egalDim = (codimension == length || curr_res->size() == codimension); // dimension of actual simplex == codimension
if (egalDim)
- cofaces.push_back(find(*curr_res));
+ cofaces.push_back(curr_sib->members().find(sib->first));
if (has_children(sib))
rec_coface(vertices, sib->second.children(), curr_res, cofaces, length, codimension);
curr_res->pop_back();
@@ -640,7 +640,7 @@ private:
curr_res->push_back(sib->first);
bool egalDim = (codimension == length || curr_res->size() == codimension); // dimension of actual simplex == codimension
if (vertices.size() == 1 && curr_res->size() > length && egalDim)
- cofaces.push_back(find(*curr_res));
+ cofaces.push_back(curr_sib->members().find(sib->first));
if (has_children(sib))
{ // Rec call
Vertex_handle tmp = vertices[vertices.size()-1];
@@ -665,33 +665,33 @@ private:
public:
/** \brief Compute the star of a n simplex
- * \param vertices handles the simplex of which we search the star
+ * \param simplex handles the simplex of which we search the star
* \return Vector of Simplex_handle, empty vector if no cofaces found.
*/
- std::vector<Simplex_handle> star(const Simplex_handle &vertices) {
- return coface(vertices, 0);
+ std::vector<Simplex_handle> star_simplex_range(const Simplex_handle simplex) {
+ return cofaces_simplex_range(simplex, 0);
}
/** \brief Compute the cofaces of a n simplex
- * \param vertices handles the n-simplex of which we search the n+codimension cofaces
+ * \param simplex handles the n-simplex of which we search the n+codimension cofaces
* \param codimension The function returns the n+codimension-cofaces of the n-simplex. If codimension = 0, return all cofaces (equivalent of star function)
* \return Vector of Simplex_handle, empty vector if no cofaces found.
* \warning n+codimension must be lower than Simplex_tree dimension, otherwise an an empty vector is returned.
*/
- std::vector<Simplex_handle> coface(const Simplex_handle &vertices, int codimension) {
+ std::vector<Simplex_handle> cofaces_simplex_range(const Simplex_handle simplex, int codimension) {
std::vector<Simplex_handle> cofaces;
if (dimension_ == -1) // Empty simplex tree
return cofaces;
- if (vertices == null_simplex()) // Empty simplex
+ if (simplex == null_simplex()) // Empty simplex
return cofaces;
if (codimension < 0) // codimension must be positive or null integer
return cofaces;
std::vector<Vertex_handle> copy;
- Simplex_vertex_range rg = simplex_vertex_range(vertices);
+ Simplex_vertex_range rg = simplex_vertex_range(simplex);
for (auto it = rg.begin(); it != rg.end(); ++it)
copy.push_back(*it);
if (codimension + copy.size() > (unsigned long)(dimension_ + 1) || (codimension == 0 && copy.size() > (unsigned long)dimension_) ) // n+codimension greater than dimension_
diff --git a/src/Simplex_tree/test/simplex_tree_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_unit_test.cpp
index eaae4149..f8de1c24 100644
--- a/src/Simplex_tree/test/simplex_tree_unit_test.cpp
+++ b/src/Simplex_tree/test/simplex_tree_unit_test.cpp
@@ -178,9 +178,9 @@ void test_cofaces(typeST& st, std::vector<Vertex_handle> v, int dim, std::vector
{
std::vector<typeST::Simplex_handle> cofaces;
if (dim == 0)
- cofaces = st.star(st.find(v));
+ cofaces = st.star_simplex_range(st.find(v));
else
- cofaces = st.coface(st.find(v), dim);
+ cofaces = st.cofaces_simplex_range(st.find(v), dim);
std::vector<Vertex_handle> currentVertices;
for (unsigned long i = 0; i < cofaces.size(); ++i)
{