17#ifndef PM_COLUMN_ENTRY_CONSTRUCTORS_H 
   18#define PM_COLUMN_ENTRY_CONSTRUCTORS_H 
   22#include <gudhi/Simple_object_pool.h> 
   25namespace persistence_matrix {
 
   36struct New_entry_constructor 
 
   41  New_entry_constructor() {}
 
   50  Entry* construct(U&&... u)
 const {
 
   51    return new Entry(std::forward<U>(u)...);
 
   59  void destroy(Entry* entry)
 const { 
delete entry; }
 
   64  friend void swap(New_entry_constructor& col1, New_entry_constructor& col2) {}
 
   77struct Pool_entry_constructor 
 
   84  Pool_entry_constructor() : entryPool_() {}
 
   91  Pool_entry_constructor(
const Pool_entry_constructor& col) : entryPool_(col.entryPool_) {}
 
   97  Pool_entry_constructor(Pool_entry_constructor&& col) : entryPool_(
std::move(col.entryPool_)) {}
 
  105  template <
class... U>
 
  106  Entry* construct(U&&... u) {
 
  107    return entryPool_.construct(std::forward<U>(u)...);
 
  115  void destroy(Entry* entry) { entryPool_.destroy(entry); }
 
  121  Pool_entry_constructor& operator=(
const Pool_entry_constructor& other) {
 
  122    entryPool_ = other.entryPool_;
 
  128  friend void swap(Pool_entry_constructor& col1, Pool_entry_constructor& col2) {
 
  129    std::swap(col1.entryPool_, col2.entryPool_);
 
  133  Simple_object_pool<Entry> entryPool_;   
 
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14