pub fn from_vec(p: ValidPrime, input: &[Vec<u32>]) -> Matrix {
        let rows = input.len();
        if rows == 0 {
            return Matrix::new(p, 0, 0);
        }
        let columns = input[0].len();
        let mut vectors = Vec::with_capacity(rows);
        for row in input {
            vectors.push(FpVector::from_slice(p, row));
        }
        Matrix::from_rows(p, vectors, columns)
    }
/// Produces a Matrix from an `&[Vec<u32>]` object. If the number of rows is 0, the number
/// of columns is also assumed to be zero.
///
/// # Example
/// ```
/// # use fp::prime::ValidPrime;
/// let p = ValidPrime::new(7);
/// # use fp::matrix::Matrix;
/// let input  = [vec![1, 3, 6],
///               vec![0, 3, 4]];
///
/// let m = Matrix::from_vec(p, &input);
Produces a Matrix from an `&[Vec]` object. If the number of rows is 0, the number
of columns is also assumed to be zero.
Produces a Matrix from an ` & [ Vec ] ` object . If the number of rows is 0 the number of columns is also assumed to be zero .
pub fn from_vec(p: ValidPrime, input: &[Vec<u32>]) -> Matrix {
        let rows = input.len();
        if rows == 0 {
            return Matrix::new(p, 0, 0);
        }
        let columns = input[0].len();
        let mut vectors = Vec::with_capacity(rows);
        for row in input {
            vectors.push(FpVector::from_slice(p, row));
        }
        Matrix::from_rows(p, vectors, columns)
    }
pub fn from_vec ( p : ValidPrime , input : & [ Vec < u32 > ] ) -> Matrix { let rows = input . len ( ) ; if rows == 0 { return Matrix :: new ( p , 0 , 0 ) ; } let columns = input [ 0 ] . len ( ) ; let mut vectors = Vec :: with_capacity ( rows ) ; for row in input { vectors . push ( FpVector :: from_slice ( p , row ) ) ; } Matrix :: from_rows ( p , vectors , columns ) }
Produces a Matrix from an `&[Vec<u32>]` object.
Produces a Matrix from an ` & [ Vec<u32 > ] ` object .
p
ValidPrime
input
&[Vec<u32>]
p
ValidPrime
input
&[Vec<u32>]
example
None
use fp::prime::validprime;
let p = ValidPrime::new(7).
let p = ValidPrime :: new ( 7 ) .
use fp::matrix::matrix;


let m = Matrix::from_vec(p, &input).
let m = Matrix :: from_vec ( p &input ) .