From 17d191b4990aa182c7e2c9daa53e513e3ebc045f Mon Sep 17 00:00:00 2001 From: glisse Date: Mon, 5 Oct 2015 17:38:35 +0000 Subject: No need for Persistent_cohomology_column to have everything private. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@828 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9eea246613f29f78d88e8f1b25cf341c05e5098c --- .../include/gudhi/Persistent_cohomology.h | 4 ++-- .../Persistent_cohomology/Persistent_cohomology_column.h | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/Persistent_cohomology/include') diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index 5f399f1a..8c614e96 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -524,8 +524,8 @@ class Persistent_cohomology { Arith_element charac) { Simplex_key key = cpx_->key(sigma); // Create a column containing only one cell, - Column * new_col = column_pool_.construct(Column(key)); - Cell * new_cell = cell_pool_.construct(Cell(key, x, new_col)); + Column * new_col = column_pool_.construct(key); + Cell * new_cell = cell_pool_.construct(key, x, new_col); new_col->col_.push_back(*new_cell); // and insert it in the matrix, in constant time thanks to the hint cam_.end(). // Indeed *new_col has the biggest lexicographic value because key is the diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h index 5d48969d..568f24df 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h @@ -80,13 +80,15 @@ class Persistent_cohomology_cell : public base_hook_cam_h, * The non-zero coefficients of the column are stored in a * boost::intrusive::list. Contains a hook to be stored in a * boost::intrusive::set. + * + * Movable but not Copyable. */ template class Persistent_cohomology_column : public boost::intrusive::set_base_hook< boost::intrusive::link_mode > { - private: template friend class Persistent_cohomology; + public: typedef Persistent_cohomology_cell Cell; typedef boost::intrusive::list, @@ -96,13 +98,6 @@ class Persistent_cohomology_column : public boost::intrusive::set_base_hook< explicit Persistent_cohomology_column(SimplexKey key) : col_(), class_key_(key) {} - public: - /** Copy constructor.*/ - Persistent_cohomology_column(Persistent_cohomology_column const &other) - : col_(), - class_key_(other.class_key_) { - assert(other.col_.empty()); - } /** \brief Returns true iff the column is null.*/ bool is_null() const { -- cgit v1.2.3