diff options
author | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-09-28 09:11:54 +0000 |
---|---|---|
committer | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-09-28 09:11:54 +0000 |
commit | 4eb67582fc0aec86d56c5839ddcb5b0bf72e95b5 (patch) | |
tree | 56c7a7a047963733724744b1727bb4b6fbd33d21 /src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h | |
parent | d8121aa7f9d6a9c8faa4aa532162b7d4452a6c29 (diff) |
Minor clean-ups (const, for-range, etc).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@798 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: de10cc12d852eab34e258bbfb98ff0aef864e453
Diffstat (limited to 'src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h')
-rw-r--r-- | src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Persistent_cohomology_column.h | 14 |
1 files changed, 6 insertions, 8 deletions
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 fcec819a..5ffd1776 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 @@ -93,27 +93,25 @@ class Persistent_cohomology_column : public boost::intrusive::set_base_hook< boost::intrusive::base_hook<base_hook_cam_v> > Col_type; /** \brief Creates an empty column.*/ - explicit Persistent_cohomology_column(SimplexKey key) { - class_key_ = key; - col_ = Col_type(); - } + 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_) { - if (!other.col_.empty()) - std::cerr << "Copying a non-empty column.\n"; + assert(other.col_.empty()); } /** \brief Returns true iff the column is null.*/ - bool is_null() { + bool is_null() const { return col_.empty(); } /** \brief Returns the key of the representative simplex of * the set of simplices having this column as annotation vector * in the compressed annotation matrix.*/ - SimplexKey class_key() { + SimplexKey class_key() const { return class_key_; } |