50 using storage_type =
typename std::vector<T>;
51 using index_type =
typename std::unordered_set<T>;
52 using const_iter_type =
typename storage_type::const_iterator;
60 IOrderSet(
const index_type& index,
const storage_type& data)
65 std::size_t size()
const {
66 return this->m_index.size();
70 return (this->size() == 0);
73 std::size_t count(
const T& value)
const {
74 return this->m_index.count(value);
77 bool contains(
const T& value)
const {
78 return (this->count(value) != 0);
81 bool insert(
const T& value) {
82 if (this->contains(value))
85 this->m_index.insert(value);
86 this->m_data.push_back(value);
90 std::size_t erase(
const T& value) {
91 if (!this->contains(value))
94 this->m_index.erase(value);
95 auto data_iter = std::find(this->m_data.begin(), this->m_data.end(), value);
96 this->m_data.erase(data_iter);
100 const_iter_type begin()
const {
101 return this->m_data.begin();
104 const_iter_type end()
const {
105 return this->m_data.end();
108 const T& operator[](std::size_t i)
const {
109 return this->m_data.at(i);
112 const std::vector<T>& data()
const {
117 return this->m_index == data.m_index &&
118 this->data() == data.data();
121 template<
class Serializer>
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30