[][src]Struct sss_rs::geometry::galois_polynomial::GaloisPolynomial

pub struct GaloisPolynomial { /* fields omitted */ }

Methods

impl GaloisPolynomial[src]

pub fn new() -> GaloisPolynomial[src]

Constructs a polynomail with no coefficients

pub fn from_slice(coeffs: &[u8]) -> GaloisPolynomial[src]

Copies the values from the coeffs slice into a vec as the coefficients of the polynomial The coefficients go from left to right, where x^0 at coeffs[0]

pub fn with_vec(coeffs: Vec<u8>) -> GaloisPolynomial[src]

Constructs a polynomial with the coefficients in the vec The coefficients go from left to right, where x^0 at coeffs[0]

pub fn from_points(points: &[(u8, u8)]) -> GaloisPolynomial[src]

Reconstructs a polynomial from the given points

pub fn get_y_intercept_from_points(points: &[(u8, u8)]) -> u8[src]

Calculates the y intercept of the polynomial formed by the given points This is more efficient than completely reconstructing the polynomial and then calling $get_y_val if you do not plan to use the reconstructed polynomial after getting the y intercept.

pub fn set_coeff(&mut self, co: Coeff, index: usize)[src]

Sets the coefficient at the given index to the given co

pub fn get_coeff(&self, index: usize) -> Coeff[src]

Returns a copy of the coefficient at the specified index

pub fn scale(self, co: Coeff) -> Self[src]

Scales the polynomial by multiplying by the co

pub fn scale_divide(self, co: Coeff) -> Self[src]

Scales the polynomial by dividing by the co

pub fn mult(self, rhs: Self) -> Self[src]

Multiplies two polynomial together

pub fn add(self, rhs: Self) -> Self[src]

Adds two polynomials together

pub fn get_y_value(&self, x_val: u8) -> u8[src]

Calculates the y-value given an x-value

Trait Implementations

impl Clone for GaloisPolynomial[src]

impl Debug for GaloisPolynomial[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]