diff options
author | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-10-05 17:38:35 +0000 |
---|---|---|
committer | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-10-05 17:38:35 +0000 |
commit | 17d191b4990aa182c7e2c9daa53e513e3ebc045f (patch) | |
tree | 91ed4cd8def16b53fc5200c7392e61299e6936ab /src/Persistent_cohomology/include | |
parent | 668ca4ef331f9f52f858f6591561b0de7ead0c2a (diff) |
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
Diffstat (limited to 'src/Persistent_cohomology/include')
-rw-r--r-- | src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h | 4 | ||||
-rw-r--r-- | src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h | 11 |
2 files changed, 5 insertions, 10 deletions
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<typename SimplexKey, typename ArithmeticElement> class Persistent_cohomology_column : public boost::intrusive::set_base_hook< boost::intrusive::link_mode<boost::intrusive::normal_link> > { - private: template<class T1, class T2> friend class Persistent_cohomology; + public: typedef Persistent_cohomology_cell<SimplexKey, ArithmeticElement> Cell; typedef boost::intrusive::list<Cell, boost::intrusive::constant_time_size<false>, @@ -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 { |