41 static constexpr size_t LENGTH = domain_end;
57 requires(!has_a0_plus_a1)
61 if constexpr (domain_end == 3) {
72 template <
size_t other_domain_end,
bool other_has_a0_plus_a1 = true>
74 requires(domain_end > other_domain_end)
78 if constexpr (domain_end == 3) {
115 for (
size_t i = 0; i <
LENGTH; ++i) {
124 for (
size_t i = 0; i !=
LENGTH; ++i) {
125 output.coefficients[i] =
Fr::zero();
135 template <
size_t other_domain_end,
bool other_has_a0_plus_a1>
144 if constexpr (other_domain_end == 3 && domain_end == 3) {
150 template <
size_t other_domain_end,
bool other_has_a0_plus_a1>
159 if constexpr (other_domain_end == 3 && domain_end == 3) {
165 template <
bool other_has_a0_plus_a1>
182 if constexpr (has_a0_plus_a1 && other_has_a0_plus_a1) {
184 }
else if constexpr (has_a0_plus_a1 && !other_has_a0_plus_a1) {
187 }
else if constexpr (!has_a0_plus_a1 && other_has_a0_plus_a1) {
198 template <
size_t other_domain_end,
bool other_has_a0_plus_a1>
208 if constexpr (other_domain_end == 3 && domain_end == 3) {
214 template <
size_t other_domain_end,
bool other_has_a0_plus_a1>
224 if constexpr (other_domain_end == 3 && domain_end == 3) {
235 if constexpr (domain_end == 3) {
254 if constexpr (has_a0_plus_a1) {
266 requires(!has_a0_plus_a1)
273 requires(!has_a0_plus_a1)
279 requires(!has_a0_plus_a1)
283 if constexpr (domain_end == 3) {
308 if constexpr (domain_end == 3) {
338template <
typename B,
class Fr,
size_t domain_end,
bool has_a0_plus_a1>
345template <
typename B,
class Fr,
size_t domain_end,
bool has_a0_plus_a1>
355template <
typename T,
size_t N,
bool X>
356struct tuple_size<
bb::UnivariateCoefficientBasis<T, N, X>> : std::integral_constant<std::size_t, N> {};
A view of a univariate, also used to truncate univariates.
bool operator==(const UnivariateCoefficientBasis &other) const =default
friend std::ostream & operator<<(std::ostream &os, const UnivariateCoefficientBasis &u)
UnivariateCoefficientBasis & operator=(const UnivariateCoefficientBasis &other)=default
UnivariateCoefficientBasis< Fr, domain_end, false > operator-(const Fr &scalar) const
std::vector< uint8_t > to_buffer() const
UnivariateCoefficientBasis()=default
static constexpr size_t LENGTH
UnivariateCoefficientBasis(const UnivariateCoefficientBasis< Fr, other_domain_end, other_has_a0_plus_a1 > &other)
UnivariateCoefficientBasis< Fr, domain_end, false > & operator*=(const Fr &scalar)
UnivariateCoefficientBasis(UnivariateCoefficientBasis &&other) noexcept=default
UnivariateCoefficientBasis< Fr, 3, false > sqr() const
UnivariateCoefficientBasis(const UnivariateCoefficientBasis< Fr, domain_end, true > &other)
UnivariateCoefficientBasis & operator+=(const Fr &scalar)
static UnivariateCoefficientBasis get_random()
UnivariateCoefficientBasis< Fr, domain_end, false > operator+(const UnivariateCoefficientBasis< Fr, other_domain_end, other_has_a0_plus_a1 > &other) const
std::array< Fr, 3 > coefficients
coefficients is a length-3 array with the following representation:
UnivariateCoefficientBasis< Fr, domain_end, false > & operator+=(const UnivariateCoefficientBasis< Fr, other_domain_end, other_has_a0_plus_a1 > &other)
static UnivariateCoefficientBasis serialize_from_buffer(uint8_t const *buffer)
UnivariateCoefficientBasis< Fr, domain_end, false > operator-() const
UnivariateCoefficientBasis & operator-=(const Fr &scalar)
UnivariateCoefficientBasis & operator=(UnivariateCoefficientBasis &&other) noexcept=default
UnivariateCoefficientBasis(const UnivariateCoefficientBasis &other)=default
UnivariateCoefficientBasis< Fr, domain_end, false > & operator-=(const UnivariateCoefficientBasis< Fr, other_domain_end, other_has_a0_plus_a1 > &other)
UnivariateCoefficientBasis< Fr, 3, false > operator*(const UnivariateCoefficientBasis< Fr, domain_end, other_has_a0_plus_a1 > &other) const
static UnivariateCoefficientBasis zero()
static UnivariateCoefficientBasis random_element()
UnivariateCoefficientBasis< Fr, domain_end, false > operator*(const Fr &scalar) const
UnivariateCoefficientBasis< Fr, domain_end, false > operator-(const UnivariateCoefficientBasis< Fr, other_domain_end, other_has_a0_plus_a1 > &other) const
~UnivariateCoefficientBasis()=default
UnivariateCoefficientBasis< Fr, domain_end, false > operator+(const Fr &scalar) const
uint8_t buffer[RANDOM_BUFFER_SIZE]
Entry point for Barretenberg command-line interface.
void read(B &it, field2< base_field, Params > &value)
void write(B &buf, field2< base_field, Params > const &value)
void read(auto &it, msgpack_concepts::HasMsgPack auto &obj)
Automatically derived read for any object that defines .msgpack() (implicitly defined by MSGPACK_FIEL...
void write(auto &buf, const msgpack_concepts::HasMsgPack auto &obj)
Automatically derived write for any object that defines .msgpack() (implicitly defined by MSGPACK_FIE...
void read(auto &buf, std::integral auto &value)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static field random_element(numeric::RNG *engine=nullptr) noexcept
static constexpr field zero()