17#ifndef PM_COLUMN_ENTRY_CONSTRUCTORS_H
18#define PM_COLUMN_ENTRY_CONSTRUCTORS_H
22#include <gudhi/Simple_object_pool.h>
36struct New_entry_constructor {
40 New_entry_constructor() =
default;
49 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([[maybe_unused]] New_entry_constructor& col1,
65 [[maybe_unused]] New_entry_constructor& col2)
noexcept {}
78struct Pool_entry_constructor {
84 Pool_entry_constructor() : entryPool_() {}
95 Entry* construct(U&&... u)
97 return entryPool_.construct(std::forward<U>(u)...);
105 void destroy(Entry* entry) { entryPool_.destroy(entry); }
110 friend void swap(Pool_entry_constructor& col1, Pool_entry_constructor& col2)
noexcept
112 std::swap(col1.entryPool_, col2.entryPool_);
116 Simple_object_pool<Entry> entryPool_;
Persistence matrix namespace.
Definition FieldOperators.h:18
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14