29#ifndef LIB_DIFF_INDEX_TABLE_H
30#define LIB_DIFF_INDEX_TABLE_H
51 template<
typename VAL>
62 for (
auto const& elm : seq)
65 data_.push_back (elm);
101 pos (VAL
const& elm)
const
103 auto entry =
idx_.find (elm);
113 throw error::Logic(
_Fmt(
"Attempt to add duplicate %s to index table") % elm);
data snapshot and lookup table
std::map< VAL, size_t > idx_
const_iterator begin() const
bool contains(VAL const &elm) const
void __rejectDuplicate(VAL const &elm)
VAL const & getElement(size_t i) const
std::vector< VAL >::const_iterator const_iterator
size_t pos(VAL const &elm) const
const_iterator end() const
std::vector< VAL >::iterator iterator
IndexTable(SEQ const &seq)
A front-end for using printf-style formatting.
Lumiera error handling (C++ interface).
Implementation namespace for support and library code.
LumieraError< LERR_(LOGIC)> Logic
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...