20#ifndef LIBMESH_MAPVECTOR_H
21#define LIBMESH_MAPVECTOR_H
24#include "libmesh/pool_allocator.h"
41template <
typename Val,
typename index_t=
unsigned int>
43 public std::map<index_t, Val, std::less<index_t>,
44 FastPoolAllocator<std::pair<const index_t, Val>>>
47 typedef std::map<index_t, Val, std::less<index_t>,
58 index_t
index()
const {
return it->first; }
71 return it == other.
it;
76 return it != other.
it;
82 typename maptype::iterator
it;
96 index_t
index()
const {
return it->first; }
109 return it == other.
it;
114 return it != other.
it;
120 typename maptype::const_iterator
it;
148 return it == other.
it;
153 return it != other.
it;
159 typename maptype::const_reverse_iterator
it;
174 return maptype::operator[](k);
179 auto it = this->maptype::find(k);
180 return it == this->
end().
it? Val() : it->second;
An allocator which can be used in standard containers.
bool operator!=(const const_reverse_veclike_iterator &other) const
const_reverse_veclike_iterator operator++(int)
const_reverse_veclike_iterator(const veclike_iterator &i)
const_reverse_veclike_iterator(const typename maptype::const_reverse_iterator &i)
maptype::const_reverse_iterator it
const Val & operator*() const
bool operator==(const const_reverse_veclike_iterator &other) const
const_reverse_veclike_iterator(const const_veclike_iterator &i)
const_reverse_veclike_iterator & operator++()
bool operator!=(const const_veclike_iterator &other) const
bool operator==(const const_veclike_iterator &other) const
const_veclike_iterator & operator++()
const_veclike_iterator operator++(int)
const_veclike_iterator(const typename maptype::const_iterator &i)
maptype::const_iterator it
const Val & operator*() const
const_veclike_iterator(const veclike_iterator &i)
bool operator==(const veclike_iterator &other) const
veclike_iterator(const typename maptype::iterator &i)
veclike_iterator & operator++()
veclike_iterator operator++(int)
bool operator!=(const veclike_iterator &other) const
This mapvector templated class is intended to provide the performance characteristics of a std::map w...
const_veclike_iterator begin() const
std::map< index_t, Val, std::less< index_t >, FastPoolAllocator< std::pair< const index_t, Val > > > maptype
veclike_iterator find(const index_t &k)
veclike_iterator erase(const veclike_iterator &pos)
const_veclike_iterator end() const
const_veclike_iterator find(const index_t &k) const
Val & operator[](const index_t &k)
The libMesh namespace provides an interface to certain functionality in the library.