pyerasure.finite_field.Binary¶The binary finite field class.
add(lhs: int, rhs: int) int¶Add two elements.
bytes_to_elements(bytes: int) int¶Convert the number of bytes to the number of elements.
divide(lhs: int, rhs: int) int¶Divide two elements.
elements_to_bytes(elements: int) int¶Convert the number of elements to the number of bytes.
get_value(elements: bytearray, index: int) int¶Return the value of the element at the given index.
is_binary() bool¶Check if the field is binary.
set_value(elements: bytearray, index: int, value: int)¶Set the value of the element at the given index.
vector_add_into(x: bytearray, y: bytearray)¶Add y into x.
vector_multiply_add_into(x: bytearray, y: bytes, c: int)¶Multiply the vector y with the constant c and then add the result to vector x.
vector_multiply_subtract_into(x: bytearray, y: bytes, c: int)¶Multiply the vector x with the vector y and subtract the result from c.
pyerasure.finite_field.Binary4(prime: int = 19)¶The binary4 finite field class.
add(lhs: int, rhs: int) int¶Add two elements.
bytes_to_elements(bytes: int) int¶Convert the number of bytes to the number of elements.
elements_to_bytes(elements: int) int¶Convert the number of elements to the number of bytes.
get_value(elements: bytearray, index: int) int¶Return the value of the element at the given index.
invert(x: int) int¶Invert the given element.
is_binary() bool¶Check if the field is binary.
set_value(elements: bytearray, index: int, value: int)¶Set the value of the element at the given index.
vector_add_into(x: bytearray, y: bytearray)¶Add y into x.
vector_multiply_add_into(x: bytearray, y: bytes, c: int)¶Multiply the vector y with the constant c and then add the result to vector x.
vector_multiply_into(x: bytearray, c: int)¶Multiply the vector x with the vector y.
vector_multiply_subtract_into(x: bytearray, y: bytes, c: int)¶Multiply the vector x with the vector y and subtract the result from c.
pyerasure.finite_field.Binary8(prime: int = 285)¶The binary8 finite field class.
add(lhs: int, rhs: int) int¶Add two elements.
bytes_to_elements(bytes: int) int¶Convert the number of bytes to the number of elements.
elements_to_bytes(elements: int) int¶Convert the number of elements to the number of bytes.
get_value(elements: bytearray, index: int) int¶Return the value of the element at the given index.
invert(x: int) int¶Invert the given element.
is_binary() bool¶Check if the field is binary.
set_value(elements: bytearray, index: int, value: int)¶Set the value of the element at the given index.
vector_add_into(x: bytearray, y: bytearray)¶Add y into x.
vector_multiply_add_into(x: bytearray, y: bytes, c: int)¶Multiply the vector y with the constant c and then add the result to vector x.
vector_multiply_into(x: bytearray, c: int)¶Multiply the vector x with the vector y.
vector_multiply_subtract_into(x: bytearray, y: bytes, c: int)¶Multiply the vector x with the vector y and subtract the result from c.