7#ifndef FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256POLY_H_
8#define FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256POLY_H_
13#include "core/fxcrt/unowned_ptr.h"
17class CBC_ReedSolomonGF256Poly
final {
20 const std::vector<int32_t>& coefficients);
28 const CBC_ReedSolomonGF256Poly* other);
30 const CBC_ReedSolomonGF256Poly* other);
33 int32_t coefficient)
const;
35 const CBC_ReedSolomonGF256Poly* other);
40 std::vector<int32_t> m_coefficients;
bool Encode(std::vector< int32_t > *toEncode, size_t ecBytes)
~CBC_ReedSolomonEncoder()
CBC_ReedSolomonEncoder(CBC_ReedSolomonGF256 *field)
int32_t GetDegree() const
std::unique_ptr< CBC_ReedSolomonGF256Poly > Clone() const
std::unique_ptr< CBC_ReedSolomonGF256Poly > MultiplyByMonomial(int32_t degree, int32_t coefficient) const
std::unique_ptr< CBC_ReedSolomonGF256Poly > Multiply(const CBC_ReedSolomonGF256Poly *other)
int32_t GetCoefficients(int32_t degree) const
const std::vector< int32_t > & GetCoefficients() const
CBC_ReedSolomonGF256Poly(CBC_ReedSolomonGF256 *field, const std::vector< int32_t > &coefficients)
~CBC_ReedSolomonGF256Poly()
std::unique_ptr< CBC_ReedSolomonGF256Poly > Divide(const CBC_ReedSolomonGF256Poly *other)
std::unique_ptr< CBC_ReedSolomonGF256Poly > AddOrSubtract(const CBC_ReedSolomonGF256Poly *other)
CBC_ReedSolomonGF256Poly * GetZero() const
int32_t Multiply(int32_t a, int32_t b)
absl::optional< int32_t > Inverse(int32_t a)
CBC_ReedSolomonGF256Poly * GetOne() const
std::unique_ptr< CBC_ReedSolomonGF256Poly > BuildMonomial(int32_t degree, int32_t coefficient)
CBC_ReedSolomonGF256(int32_t primitive)
static int32_t AddOrSubtract(int32_t a, int32_t b)