7#ifndef FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256_H_
8#define FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256_H_
12#include "third_party/abseil-cpp/absl/types/optional.h"
14class CBC_ReedSolomonGF256Poly;
21 CBC_ReedSolomonGF256Poly*
GetZero()
const {
return m_zero.get(); }
22 CBC_ReedSolomonGF256Poly*
GetOne()
const {
return m_one.get(); }
27 int32_t
Exp(int32_t a);
29 int32_t
Multiply(int32_t a, int32_t b);
33 std::unique_ptr<CBC_ReedSolomonGF256Poly> m_zero;
34 std::unique_ptr<CBC_ReedSolomonGF256Poly> m_one;
35 int32_t m_expTable[256];
36 int32_t m_logTable[256];
bool Encode(std::vector< int32_t > *toEncode, size_t ecBytes)
~CBC_ReedSolomonEncoder()
CBC_ReedSolomonEncoder(CBC_ReedSolomonGF256 *field)
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)