fn mul_scalar(&self, scalar: &EccScalar) -> ThresholdEcdsaResult<Self> {
        if self.curve_type() != scalar.curve_type() {
            return Err(ThresholdEcdsaError::CurveMismatch);
        }

        let n_coeffs = self.coefficients.len();
        let mut coeffs = Vec::with_capacity(n_coeffs);

        for i in 0..n_coeffs {
            coeffs.push(self.coefficients[i].mul(scalar)?);
        }

        Self::new(self.curve_type(), coeffs)
    }
/// Compute product of a polynomial and a scalar
Compute product of a polynomial and a scalar
Compute product of a polynomial and a scalar
fn mul_scalar(&self, scalar: &EccScalar) -> ThresholdEcdsaResult<Self> {
        if self.curve_type() != scalar.curve_type() {
            return Err(ThresholdEcdsaError::CurveMismatch);
        }
        let n_coeffs = self.coefficients.len();
        let mut coeffs = Vec::with_capacity(n_coeffs);
        for i in 0..n_coeffs {
            coeffs.push(self.coefficients[i].mul(scalar)?);
        }
        Self::new(self.curve_type(), coeffs)
    }
fn mul_scalar ( & self , scalar : & EccScalar ) -> ThresholdEcdsaResult < Self > { if self . curve_type ( ) != scalar . curve_type ( ) { return Err ( ThresholdEcdsaError :: CurveMismatch ) ; } let n_coeffs = self . coefficients . len ( ) ; let mut coeffs = Vec :: with_capacity ( n_coeffs ) ; for i in 0 .. n_coeffs { coeffs . push ( self . coefficients [ i ] . mul ( scalar ) ? ) ; } Self :: new ( self . curve_type ( ) , coeffs ) }
Compute product of a polynomial and a scalar
Compute product of a polynomial and a scalar
&self
scalar
&EccScalar
&self
scalar
&EccScalar