Documentation ¶
Index ¶
- Variables
- func GenericGF_addOrSubtract(a, b int) int
- type GenericGF
- func (this *GenericGF) BuildMonomial(degree, coefficient int) (*GenericGFPoly, error)
- func (this *GenericGF) Exp(a int) int
- func (this *GenericGF) GetGeneratorBase() int
- func (this *GenericGF) GetOne() *GenericGFPoly
- func (this *GenericGF) GetSize() int
- func (this *GenericGF) GetZero() *GenericGFPoly
- func (this *GenericGF) Inverse(a int) (int, error)
- func (this *GenericGF) Log(a int) (int, error)
- func (this *GenericGF) Multiply(a, b int) int
- func (this *GenericGF) String() string
- type GenericGFPoly
- func (this *GenericGFPoly) AddOrSubtract(other *GenericGFPoly) (*GenericGFPoly, error)
- func (this *GenericGFPoly) Divide(other *GenericGFPoly) (quotient, remainder *GenericGFPoly, e error)
- func (this *GenericGFPoly) EvaluateAt(a int) int
- func (this *GenericGFPoly) GetCoefficient(degree int) int
- func (this *GenericGFPoly) GetCoefficients() []int
- func (this *GenericGFPoly) GetDegree() int
- func (this *GenericGFPoly) IsZero() bool
- func (this *GenericGFPoly) Multiply(other *GenericGFPoly) (*GenericGFPoly, error)
- func (this *GenericGFPoly) MultiplyBy(scalar int) *GenericGFPoly
- func (this *GenericGFPoly) MultiplyByMonomial(degree, coefficient int) (*GenericGFPoly, error)
- func (this *GenericGFPoly) String() string
- type ReedSolomonDecoder
- type ReedSolomonEncoder
- type ReedSolomonException
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GenericGF_AZTEC_DATA_12 = NewGenericGF(0x1069, 4096, 1) // x^12 + x^6 + x^5 + x^3 + 1 GenericGF_AZTEC_DATA_10 = NewGenericGF(0x409, 1024, 1) // x^10 + x^3 + 1 GenericGF_AZTEC_DATA_6 = NewGenericGF(0x43, 64, 1) // x^6 + x + 1 GenericGF_AZTEC_PARAM = NewGenericGF(0x13, 16, 1) // x^4 + x + 1 GenericGF_QR_CODE_FIELD_256 = NewGenericGF(0x011D, 256, 0) // x^8 + x^4 + x^3 + x^2 + 1 GenericGF_DATA_MATRIX_FIELD_256 = NewGenericGF(0x012D, 256, 1) // x^8 + x^5 + x^3 + x^2 + 1 GenericGF_AZTEC_DATA_8 = GenericGF_DATA_MATRIX_FIELD_256 GenericGF_MAXICODE_FIELD_64 = GenericGF_AZTEC_DATA_6 )
Functions ¶
func GenericGF_addOrSubtract ¶
Types ¶
type GenericGF ¶
type GenericGF struct {
// contains filtered or unexported fields
}
func NewGenericGF ¶
func (*GenericGF) BuildMonomial ¶
func (this *GenericGF) BuildMonomial(degree, coefficient int) (*GenericGFPoly, error)
func (*GenericGF) GetGeneratorBase ¶
func (*GenericGF) GetOne ¶
func (this *GenericGF) GetOne() *GenericGFPoly
func (*GenericGF) GetZero ¶
func (this *GenericGF) GetZero() *GenericGFPoly
type GenericGFPoly ¶
type GenericGFPoly struct {
// contains filtered or unexported fields
}
func NewGenericGFPoly ¶
func NewGenericGFPoly(field *GenericGF, coefficients []int) (*GenericGFPoly, error)
func (*GenericGFPoly) AddOrSubtract ¶
func (this *GenericGFPoly) AddOrSubtract(other *GenericGFPoly) (*GenericGFPoly, error)
func (*GenericGFPoly) Divide ¶
func (this *GenericGFPoly) Divide(other *GenericGFPoly) (quotient, remainder *GenericGFPoly, e error)
func (*GenericGFPoly) EvaluateAt ¶
func (this *GenericGFPoly) EvaluateAt(a int) int
func (*GenericGFPoly) GetCoefficient ¶
func (this *GenericGFPoly) GetCoefficient(degree int) int
func (*GenericGFPoly) GetCoefficients ¶
func (this *GenericGFPoly) GetCoefficients() []int
func (*GenericGFPoly) GetDegree ¶
func (this *GenericGFPoly) GetDegree() int
func (*GenericGFPoly) IsZero ¶
func (this *GenericGFPoly) IsZero() bool
func (*GenericGFPoly) Multiply ¶
func (this *GenericGFPoly) Multiply(other *GenericGFPoly) (*GenericGFPoly, error)
func (*GenericGFPoly) MultiplyBy ¶
func (this *GenericGFPoly) MultiplyBy(scalar int) *GenericGFPoly
func (*GenericGFPoly) MultiplyByMonomial ¶
func (this *GenericGFPoly) MultiplyByMonomial(degree, coefficient int) (*GenericGFPoly, error)
func (*GenericGFPoly) String ¶
func (this *GenericGFPoly) String() string
type ReedSolomonDecoder ¶
type ReedSolomonDecoder struct {
// contains filtered or unexported fields
}
func NewReedSolomonDecoder ¶
func NewReedSolomonDecoder(field *GenericGF) *ReedSolomonDecoder
func (*ReedSolomonDecoder) Decode ¶
func (this *ReedSolomonDecoder) Decode(received []int, twoS int) ReedSolomonException
type ReedSolomonEncoder ¶
type ReedSolomonEncoder struct {
// contains filtered or unexported fields
}
func NewReedSolomonEncoder ¶
func NewReedSolomonEncoder(field *GenericGF) *ReedSolomonEncoder
type ReedSolomonException ¶
type ReedSolomonException interface { error // contains filtered or unexported methods }
func NewReedSolomonException ¶
func NewReedSolomonException(msg string) ReedSolomonException
func WrapReedSolomonException ¶
func WrapReedSolomonException(err error) ReedSolomonException
Click to show internal directories.
Click to hide internal directories.