[−][src]Struct sss_rs::geometry::galois_polynomial::GaloisPolynomial
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]
fn clone(&self) -> GaloisPolynomial
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for GaloisPolynomial
[src]
Auto Trait Implementations
impl Send for GaloisPolynomial
impl Sync for GaloisPolynomial
impl Unpin for GaloisPolynomial
impl UnwindSafe for GaloisPolynomial
impl RefUnwindSafe for GaloisPolynomial
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,