Macaulay2 Engine
Loading...
Searching...
No Matches
PolynomialStream.hpp
Go to the documentation of this file.
1#pragma once
2
30
31namespace newf4
32{
33
34// TODO: these must match BasicPoly.
35using Coefficient = int32_t;
36using VarIndex = int32_t;
37using Exponent = int32_t;
38using Component = int32_t;
39
40// this feels more like specifying a base class than a concept...
41// TODO: once we go to c++20, enable the concept PolynomialStream
42#if 0
43template <typename T>
44concept PolynomialStream = requires (T str,
45 size_t count,
46 Component com,
47 VarIndex index,
49 Coefficient coefficient) {
50 { str.idealBegin(count) } -> std::convertible_to<void>;
51 { str.appendPolynomialBegin(count) } -> std::convertible_to<void>;
52 { str.appendTermBegin(com) } -> std::convertible_to<void>;
53 { str.appendExponent(index, exponent) } -> std::convertible_to<void>;
54 { str.appendTermDone(coefficient) } -> std::convertible_to<void>;
55 { str.appendPolynomialDone() } -> std::convertible_to<void>;
56 { str.idealDone() } -> std::convertible_to<void>;
57 // testing to see if concept works
58 // { str.dummy() } -> std::convertible_to<void>;
59};
60#endif
61
62} // end namespace newf4
63
64// Local Variables:
65// indent-tabs-mode: nil
66// End:
int * exponent
Definition exptable.h:34
int32_t Component
int32_t Coefficient
int32_t VarIndex
int32_t Exponent
#define T
Definition table.c:13