Skip to content
Snippets Groups Projects
Commit 765182e0 authored by Christian Engwer's avatar Christian Engwer
Browse files

size, resize and clear method for lru

[[Imported from SVN: r5025]]
parent f430584e
No related branches found
No related tags found
No related merge requests found
......@@ -179,6 +179,34 @@ namespace Dune {
return it->second;
}
/**
*
*/
size_type size() const
{
return _data.size();
}
/**
*
*/
void resize(size_type new_size)
{
assert(new_size <= size());
while (new_size < size())
pop_back();
}
/**
*
*/
void clear()
{
_data.clear();
_index.clear();
}
private:
list_type _data;
map_type _index;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment