pub fn msm<G, F, I, J>(
    bases_stream: J,
    scalars_stream: I,
    max_msm_buffer_log: usize,
) -> G::Projective
where
    G: AffineCurve,
    I: Iterable,
    F: PrimeField,
    I::Item: Borrow<F>,
    J: Iterable,
    J::Item: Borrow<G>,
{
    assert!(scalars_stream.len() <= bases_stream.len());

    // remove offset
    let mut bases = bases_stream.iter();
    let scalars = scalars_stream.iter();

    // align the streams
    bases
        .advance_by(bases_stream.len() - scalars_stream.len())
        .expect("bases not long enough");
    msm_internal(bases, scalars, scalars_stream.len(), max_msm_buffer_log)
}
/// Streaming multi-scalar multiplication algorithm.
Streaming multi-scalar multiplication algorithm.
Streaming multi - scalar multiplication algorithm .
pub fn msm<G, F, I, J>(
    bases_stream: J,
    scalars_stream: I,
    max_msm_buffer_log: usize,
) -> G::Projective
where
    G: AffineCurve,
    I: Iterable,
    F: PrimeField,
    I::Item: Borrow<F>,
    J: Iterable,
    J::Item: Borrow<G>,
{
    assert!(scalars_stream.len() <= bases_stream.len());
    // remove offset
    let mut bases = bases_stream.iter();
    let scalars = scalars_stream.iter();
    // align the streams
    bases
        .advance_by(bases_stream.len() - scalars_stream.len())
        .expect("bases not long enough");
    msm_internal(bases, scalars, scalars_stream.len(), max_msm_buffer_log)
}
pub fn msm < G , F , I , J > ( bases_stream : J , scalars_stream : I , max_msm_buffer_log : usize , ) -> G :: Projective where G : AffineCurve , I : Iterable , F : PrimeField , I :: Item : Borrow < F > , J : Iterable , J :: Item : Borrow < G > , { assert ! ( scalars_stream len ( ) bases_stream len ( ) ) ; // remove offset let mut bases = bases_stream . iter ( ) ; let scalars = scalars_stream . iter ( ) ; // align the streams bases . advance_by ( bases_stream . len ( ) - scalars_stream . len ( ) ) . expect ( " " ) ; msm_internal ( bases , scalars , scalars_stream . len ( ) , max_msm_buffer_log ) }
Streaming multi-scalar multiplication algorithm.
Streaming multi - scalar multiplication algorithm .
bases_stream
J
scalars_stream
I
max_msm_buffer_log
usize