14template <
class T>
class list;
15template <
class T,
class U>
class hashmap;
21template <
class T,
class U>
24template <
class T,
class U>
26template <
class T,
class U>
28template <
class T,
class U>
30template <
class T,
class U>
216#define TMPL template <class T, class U>
#define CONCRETE_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2)
Macro used to define the implementation of a concrete smart pointer with reference counting for two t...
void resize(int n)
Resizes the hashmap and rehashes all existing keys.
void reset(T x)
Remove a specific key from the hashmap, if it exists.
void write_back(T x, hashmap< T, U > base)
Writes back a key-value pair into the current hashmap using a base hashmap as a reference.
void post_patch(hashmap< T, U > patch, hashmap< T, U > base)
Applies a post-patch to the current hashmap using another hashmap as a base reference.
U & bracket_rw_debug(T x)
friend hashmap< T, U > copy LESSGTR(hashmap< T, U > h)
friend hashmap< T, U > changes LESSGTR(hashmap< T, U > patch, hashmap< T, U > base)
friend int N LESSGTR(hashmap< T, U > h)
void generate(void(*routine)(T))
Applies a given routine to each key in the hashmap.
friend class edit_env_rep
list< hashentry< T, U > > * a
void pre_patch(hashmap< T, U > patch, hashmap< T, U > base)
Applies a patch to the current hashmap using another hashmap as a base reference.
friend hashmap< T, U > invert LESSGTR(hashmap< T, U > patch, hashmap< T, U > base)
void join(hashmap< T, U > H)
Joins another hashmap into the current hashmap.
A simple hashmap class implementation.
U operator[](T x)
Read-only access operator.
hashmap(U init, int n=1, int max=1)
Constructor that allows custom initial value, size, and maximum load factor.
U & operator()(T x)
Read-write access to the value mapped by the key x.
CONCRETE_TEMPLATE_2(hashmap, T, U)
hashmap()
Default constructor that initializes the hashmap with default parameters.
static hashmap< T, U > init
The list class represents a linked list.
void tm_delete_array(C *Ptr)
bool operator!=(hashmap< T, U > h1, hashmap< T, U > h2)
hashmap< T, U > copy(hashmap< T, U > h)
hashmap< T, U > changes(hashmap< T, U > p, hashmap< T, U > b)
Creates a new hashmap containing entries that have changed in the 'patch' compared to 'base'.
tm_ostream & operator<<(tm_ostream &out, hashmap< T, U > h)
bool operator==(hashmap< T, U > h1, hashmap< T, U > h2)
int N(hashmap< T, U > a)
Returns the size of the given hashmap.
hashmap< T, U > invert(hashmap< T, U > p, hashmap< T, U > b)
Creates a new hashmap containing entries that are different in the 'patch' compared to 'base',...
SI max(SI i, SI j)
Returns the maximum of two signed integers.
Structure representing a concrete object with a reference count.
Hash entry template for key-value pairs.
Helper struct for type identification and initialization.