From de85c55789660b213112770ec73bcf03d23ffaa4 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Tue, 6 Nov 2018 09:54:13 +0100 Subject: Renaming. --- include/gudhi_laplacian/sparse_row.hpp | 48 ---------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 include/gudhi_laplacian/sparse_row.hpp (limited to 'include/gudhi_laplacian/sparse_row.hpp') diff --git a/include/gudhi_laplacian/sparse_row.hpp b/include/gudhi_laplacian/sparse_row.hpp deleted file mode 100644 index 9896625..0000000 --- a/include/gudhi_laplacian/sparse_row.hpp +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace Gudhi_laplacian -{ - template - using Sparse_row = std::vector >; - - template - void compress_sparse_row(Sparse_row & row) - { - static_assert(std::is_arithmetic::value, "Only arithmetic types are supported."); - - Sparse_row tmp(row); - row.clear(); - std::sort(tmp.begin(), tmp.end()); - for (auto it = tmp.cbegin(); it != tmp.cend(); ++it) - { - if (row.empty()) - { - if (it->second != T()) - { - row.push_back(*it); - } - } - else if (it->first == row.back().first) - { - T x = row.back().second + it->second; - if (x == T()) - { - row.pop_back(); - } - else - { - row.back().second = x; - } - } - else if (it->second != T()) - { - row.push_back(*it); - } - } - } -} -- cgit v1.2.3