1#ifndef ORDERED_HASH_MAP_HPP
2#define ORDERED_HASH_MAP_HPP
3#include <unordered_map>
8 std::unordered_map<K, size_t>
um;
16 return vec[
um[k]].second;
21 V &
at(
const K &k) {
return vec[
um.at(k)].second; }
24 const size_t id =
um[k];
27 um[
vec[id].first] = id;
CGAL::Exact_predicates_inexact_constructions_kernel K
A simple vector class template.
void pop_back()
Removes the last element of the vector.
void push_back(const T &value)
Adds an element to the end of the vector.
iterator begin()
Returns an iterator to the first element.
iterator end()
Returns an iterator to the last element.
size_t size() const
Returns the number of elements in the vector.
T & back()
Returns a reference to the last element.
this file contains various miscellanious utility functions & helpers *
const_iterator begin() const
typename decltype(vec)::iterator iterator
typename decltype(vec)::const_iterator const_iterator
std::vector< std::pair< K, V > > vec
const_iterator end() const
std::unordered_map< K, size_t > um
V & operator[](const K &k)