Macaulay2 Engine
Loading...
Searching...
No Matches
ntuple-monomial.hpp
Go to the documentation of this file.
1// Copyright 1997-2006 Michael E. Stillman
2
3#ifndef _ntuple_monomial_hpp_
4#define _ntuple_monomial_hpp_
5
32
33#include "ExponentVector.hpp"
34
35// CAVEAT: NO overflow checking is done with this class.
36// TODO: make this file obsolete
37
38// Legacy specialization
40
44
45// FIXME: different implementation
46template <>
49{
51 int i;
52 size_t j;
53 for (i = 0, j = 0; i < nvars; i++, j++)
54 {
55 if (j == 8 * sizeof(HashExponent)) j = 0;
56 if (a[i] > 0) result |= (1 << j);
57 }
58 return result;
59}
60
61#endif
62
63// Local Variables:
64// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
65// indent-tabs-mode: nil
66// End:
Dense exponent-vector template [e_0, ..., e_{nvars-1}] for monomial operations.
std::make_unsigned< Exponent >::type HashExponent
static HashExponent mask(int nvars, ConstExponents a)
VALGRIND_MAKE_MEM_DEFINED & result(result)
ntuple_monomials::Exponent ntuple_word
ExponentVector< int64_t, false > ntuple_monomials
ntuple_word * ntuple_monomial
const ntuple_word * const_ntuple_monomial