Macaulay2 Engine
Loading...
Searching...
No Matches
Polynomial.cpp
Go to the documentation of this file.
1#include "Polynomial.hpp"
2
3std::ostream& operator<<(std::ostream& o, const Monom& m)
4{
5 o << "[";
6 for (int i=0; i<m[0]; ++i)
7 o << m[i] << " ";
8 o << "]";
9 return o;
10}
11
12std::ostream& operator<<(std::ostream& o, const ModuleMonom& m)
13{
14 o << "[";
15 for (int i=0; i<m[0]-1; ++i)
16 o << m[i] << " ";
17 o << m[m[0]-1] << "]";
18 return o;
19 o << "val=" << m[1] << " comp= " << m[3] << " [";
20 for (int i=3; i<m.size(); ++i)
21 o << m[i] << " ";
22 o << "]" << std::endl;
23 return o;
24}
25
26// Local Variables:
27// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
28// indent-tabs-mode: nil
29// End:
std::ostream & operator<<(std::ostream &o, const Monom &m)
Definition Polynomial.cpp:3
Modern Monom / Polynomial value types shared by NC algebras and the refactored F4.
int size() const
Monom extended with a module component, a stored index, and a memoised hash — the value type of IntsS...
Non-owning view onto a [length, degree, v1, v2, ..., vn] packed monomial in some externally managed b...