/// Create new square matrix from vector values. The first value
/// will be assigned to index (0, 0), the second one to index (0, 1),
/// and so on. An error is returned if the number of values is not a
/// square number.
Create new square matrix from vector values. The first value
will be assigned to index (0, 0), the second one to index (0, 1),
and so on. An error is returned if the number of values is not a
square number.
Create new square matrix from vector values . The first value will be assigned to index ( 0 0 ) the second one to index ( 0 1 ) and so on . An error is returned if the number of values is not a square number .
pub fn square_from_vec(values: Vec<C>) -> Result<Self, MatrixFormatError> {
        if let Some(size) = uint_sqrt(values.len()) {
            Self::from_vec(size, size, values)
        } else {
            Err(MatrixFormatError(format!(
                "length of vector ({}) is not a square number",
                values.len()
            )))
        }
    }
pub fn square_from_vec ( values : Vec < C > ) -> Result < Self , MatrixFormatError > { if let Some ( size ) = uint_sqrt ( values . len ( ) ) { Self :: from_vec ( size , size , values ) } else { Err ( MatrixFormatError ( format ! ( " " values len ( ) ) ) ) } }
Create new square matrix from vector values.
Create new square matrix from vector values .
values
Vec<C>