@@ -6,7 +6,7 @@ pub struct LinearCombination {
66}
77
88pub struct Morphism < G : Group > {
9- pub linear_combinaison : Vec < LinearCombination > ,
9+ pub linear_combination : Vec < LinearCombination > ,
1010 pub group_elements : Vec < G > ,
1111 pub num_scalars : usize ,
1212 pub num_elements : usize ,
@@ -23,23 +23,23 @@ fn msm_pr<G: Group>(scalars: &[G::Scalar], bases: &[G]) -> G {
2323impl < G : Group > Morphism < G > {
2424 pub fn new ( ) -> Self {
2525 Self {
26- linear_combinaison : Vec :: new ( ) ,
26+ linear_combination : Vec :: new ( ) ,
2727 group_elements : Vec :: new ( ) ,
2828 num_scalars : 0 ,
2929 num_elements : 0 ,
3030 }
3131 }
3232
3333 pub fn append ( & mut self , lc : LinearCombination ) {
34- self . linear_combinaison . push ( lc) ;
34+ self . linear_combination . push ( lc) ;
3535 }
3636
3737 pub fn num_statements ( & self ) -> usize {
38- self . linear_combinaison . len ( )
38+ self . linear_combination . len ( )
3939 }
4040
4141 pub fn evaluate ( & self , scalars : & [ <G as Group >:: Scalar ] ) -> Vec < G > {
42- self . linear_combinaison . iter ( ) . map ( |lc| {
42+ self . linear_combination . iter ( ) . map ( |lc| {
4343 let coefficients: Vec < _ > = lc. scalar_indices . iter ( ) . map ( |& i| scalars[ i] . clone ( ) ) . collect ( ) ;
4444 let elements: Vec < _ > = lc. element_indices . iter ( ) . map ( |& i| self . group_elements [ i] . clone ( ) ) . collect ( ) ;
4545 msm_pr ( & coefficients, & elements)
0 commit comments