summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h4
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h11
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 {