pub fn to_matrices(&self) -> Option<ConstraintMatrices<F>> {
        if let SynthesisMode::Prove {
            construct_matrices: false,
        } = self.mode
        {
            None
        } else {
            let a: Vec<_> = self
                .a_constraints
                .iter()
                .map(|index| self.make_row(self.lc_map.get(index).unwrap()))
                .collect();
            let b: Vec<_> = self
                .b_constraints
                .iter()
                .map(|index| self.make_row(self.lc_map.get(index).unwrap()))
                .collect();
            let c: Vec<_> = self
                .c_constraints
                .iter()
                .map(|index| self.make_row(self.lc_map.get(index).unwrap()))
                .collect();

            let a_num_non_zero: usize = a.iter().map(|lc| lc.len()).sum();
            let b_num_non_zero: usize = b.iter().map(|lc| lc.len()).sum();
            let c_num_non_zero: usize = c.iter().map(|lc| lc.len()).sum();
            let matrices = ConstraintMatrices {
                num_instance_variables: self.num_instance_variables,
                num_witness_variables: self.num_witness_variables,
                num_constraints: self.num_constraints,

                a_num_non_zero,
                b_num_non_zero,
                c_num_non_zero,

                a,
                b,
                c,
            };
            Some(matrices)
        }
    }
/// This step must be called after constraint generation has completed, and
/// after all symbolic LCs have been inlined into the places that they
/// are used.
This step must be called after constraint generation has completed, and
after all symbolic LCs have been inlined into the places that they
are used.
This step must be called after constraint generation has completed and after all symbolic LCs have been inlined into the places that they are used .
pub fn to_matrices(&self) -> Option<ConstraintMatrices<F>> {
        if let SynthesisMode::Prove {
            construct_matrices: false,
        } = self.mode
        {
            None
        } else {
            let a: Vec<_> = self
                .a_constraints
                .iter()
                .map(|index| self.make_row(self.lc_map.get(index).unwrap()))
                .collect();
            let b: Vec<_> = self
                .b_constraints
                .iter()
                .map(|index| self.make_row(self.lc_map.get(index).unwrap()))
                .collect();
            let c: Vec<_> = self
                .c_constraints
                .iter()
                .map(|index| self.make_row(self.lc_map.get(index).unwrap()))
                .collect();
            let a_num_non_zero: usize = a.iter().map(|lc| lc.len()).sum();
            let b_num_non_zero: usize = b.iter().map(|lc| lc.len()).sum();
            let c_num_non_zero: usize = c.iter().map(|lc| lc.len()).sum();
            let matrices = ConstraintMatrices {
                num_instance_variables: self.num_instance_variables,
                num_witness_variables: self.num_witness_variables,
                num_constraints: self.num_constraints,
                a_num_non_zero,
                b_num_non_zero,
                c_num_non_zero,
                a,
                b,
                c,
            };
            Some(matrices)
        }
    }
pub fn to_matrices ( & self ) -> Option < ConstraintMatrices < F > > { if let SynthesisMode :: Prove { construct_matrices : false , } = self . mode { None } else { let a : Vec < _ > = self . a_constraints . iter ( ) . map ( | index | self . make_row ( self . lc_map . get ( index ) . unwrap ( ) ) ) . collect ( ) ; let b : Vec < _ > = self . b_constraints . iter ( ) . map ( | index | self . make_row ( self . lc_map . get ( index ) . unwrap ( ) ) ) . collect ( ) ; let c : Vec < _ > = self . c_constraints . iter ( ) . map ( | index | self . make_row ( self . lc_map . get ( index ) . unwrap ( ) ) ) . collect ( ) ; let a_num_non_zero : usize = a . iter ( ) . map ( | lc | lc . len ( ) ) . sum ( ) ; let b_num_non_zero : usize = b . iter ( ) . map ( | lc | lc . len ( ) ) . sum ( ) ; let c_num_non_zero : usize = c . iter ( ) . map ( | lc | lc . len ( ) ) . sum ( ) ; let matrices = ConstraintMatrices { num_instance_variables : self . num_instance_variables , num_witness_variables : self . num_witness_variables , num_constraints : self . num_constraints , a_num_non_zero , b_num_non_zero , c_num_non_zero , a , b , c , } ; Some ( matrices ) } }
This step must be called after constraint generation has completed, and
after all symbolic LCs have been inlined into the places that they
are used.
This step must be called after constraint generation has completed and after all symbolic LCs have been inlined into the places that they are used .
&self
&self