|
Macaulay2 Engine
|
MonomialHashTable<ValueType> — open-addressing intern table for F4 and resolution monomials. More...
#include <memory>#include "f4/moninfo.hpp"#include "schreyer-resolution/res-moninfo.hpp"#include "schreyer-resolution/res-monomial-types.hpp"Go to the source code of this file.
Classes | |
| class | MonomialsWithComponent |
| MonHashTable trait for packed_monomials that include the component coordinate in equality. More... | |
| class | MonomialsIgnoringComponent |
| MonHashTable trait for packed_monomials that fold all components together (used when only the underlying monomial matters). More... | |
| class | ResMonomialsWithComponent |
| MonHashTable trait for the resolution engine's res_packed_monomials, with components included. More... | |
| class | ResMonomialsIgnoringComponent |
| MonHashTable trait for res_packed_monomials with the component coordinate folded out. More... | |
| class | MonomialHashTable< ValueType > |
MonomialHashTable<ValueType> — open-addressing intern table for F4 and resolution monomials.
Declares the template class MonomialHashTable<ValueType>, a power-of-2 open-addressing hash table whose only public operations are find_or_insert, reset, dump, and show — it interns value pointers (each ValueType::value carries its own precomputed hash in the encoding) and grows itself by doubling logsize and rehashing. Storage is a flat std::unique_ptr<value[]> hashtab of 2^logsize slots (initial logsize = 24) plus a hashmask and a threshold; the table also records nclashes, max_run_length, monequal_count, monequal_fails for dump/diagnostic output.
ValueType must supply typename value, hash_value(value), is_equal(value, value), and show(value). Four such traits ship in this header: MonomialsWithComponent (hashes m[0] + m[1], keeps free-module slots distinct so the table can map Macaulay-matrix columns) and MonomialsIgnoringComponent (hashes m[0], strips the component for equality) for the F4 packed_monomial encoding, and the ResMonomialsWithComponent / ResMonomialsIgnoringComponent res_packed_monomial analogues. The With-Component variant on the resolution side folds in 34141 * get_component(m) so distinct free-module slots stay distinguishable. The companion monhashtable.cpp also instantiates MonomialHashTable<MonomialInfo> (with MonomialInfo as its own trait), giving five live instantiations.
Definition in file monhashtable.hpp.