summaryrefslogtreecommitdiff
path: root/include/gudhi_laplacian/simplex_tree.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/gudhi_laplacian/simplex_tree.hpp')
-rw-r--r--include/gudhi_laplacian/simplex_tree.hpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/gudhi_laplacian/simplex_tree.hpp b/include/gudhi_laplacian/simplex_tree.hpp
index 72cae62..dafcd06 100644
--- a/include/gudhi_laplacian/simplex_tree.hpp
+++ b/include/gudhi_laplacian/simplex_tree.hpp
@@ -8,7 +8,7 @@
#include <gudhi/Simplex_tree.h>
-#include "sparse_row.hpp"
+#include "sparse_vector.hpp"
#include "misc.hpp"
namespace Gudhi_laplacian
@@ -62,10 +62,10 @@ namespace Gudhi_laplacian
return stratification;
}
- Sparse_row<int> assemble_cbd_row(ST & st, ST::Simplex_handle s)
+ Sparse_vector<int> assemble_cbd_row(ST & st, ST::Simplex_handle s)
{
std::cerr << "WARNING: This function has not been tested much." << std::endl;
- Sparse_row<int> ret;
+ Sparse_vector<int> ret;
// This is a specialization of face_sign.
int sign = (st.dimension(s) % 2 == 0) ? 1 : -1;
@@ -79,9 +79,9 @@ namespace Gudhi_laplacian
return ret;
}
- Sparse_row<double> assemble_laplacian_row(ST & st, const std::vector<std::vector<double> > & weights, ST::Simplex_handle s)
+ Sparse_vector<double> assemble_laplacian_row(ST & st, const std::vector<std::vector<double> > & weights, ST::Simplex_handle s)
{
- Sparse_row<double> row;
+ Sparse_vector<double> row;
int dim = st.dimension(s);
ST::Simplex_key s_key = ST::key(s);
@@ -121,7 +121,7 @@ namespace Gudhi_laplacian
bd_s_sign *= -1;
}
- compress_sparse_row(row);
+ compress_sparse_vector(row);
return row;
}
@@ -156,7 +156,7 @@ namespace Gudhi_laplacian
// For indices.
for (auto it = stratification[d+1].cbegin(); it != stratification[d+1].cend(); ++it)
{
- Sparse_row<int> row = assemble_cbd_row(st, *it);
+ Sparse_vector<int> row = assemble_cbd_row(st, *it);
assert(row.size() == d+2);
for (auto jt = row.cbegin(); jt != row.cend(); ++jt)
{
@@ -167,7 +167,7 @@ namespace Gudhi_laplacian
// For values.
for (auto it = stratification[d+1].cbegin(); it != stratification[d+1].cend(); ++it)
{
- Sparse_row<int> row = assemble_cbd_row(st, *it);
+ Sparse_vector<int> row = assemble_cbd_row(st, *it);
assert(row.size() == d+2);
for (auto jt = row.cbegin(); jt != row.cend(); ++jt)
{
@@ -211,7 +211,7 @@ namespace Gudhi_laplacian
// First traversal (counting).
for (auto it = stratification[d].cbegin(); it != stratification[d].cend(); ++it)
{
- Sparse_row<double> row = assemble_laplacian_row(st, weights, *it);
+ Sparse_vector<double> row = assemble_laplacian_row(st, weights, *it);
num_nonzero += row.size();
num_nonzero_row.push_back(row.size());
}
@@ -223,7 +223,7 @@ namespace Gudhi_laplacian
// Second traversal (indices).
for (auto it = stratification[d].cbegin(); it != stratification[d].cend(); ++it)
{
- Sparse_row<double> row = assemble_laplacian_row(st, weights, *it);
+ Sparse_vector<double> row = assemble_laplacian_row(st, weights, *it);
for (auto jt = row.cbegin(); jt != row.cend(); ++jt)
{
write_be<int32_t>(file, jt->first);
@@ -233,7 +233,7 @@ namespace Gudhi_laplacian
// Third traversal (values).
for (auto it = stratification[d].cbegin(); it != stratification[d].cend(); ++it)
{
- Sparse_row<double> row = assemble_laplacian_row(st, weights, *it);
+ Sparse_vector<double> row = assemble_laplacian_row(st, weights, *it);
for (auto jt = row.cbegin(); jt != row.cend(); ++jt)
{
write_be<double>(file, jt->second);