fn new(table_type: TableType, density_num: usize) -> Self {
        let rows = vec![Vec::with_capacity(0)];
        let mut column_width = Vec::with_capacity(6 + density_num);
        column_width.push(1);
        column_width.push(1);
        column_width.push(1);
        column_width.push(1);
        column_width.push(6);
        match density_num.cmp(&2) {
            std::cmp::Ordering::Greater => {
                column_width.push(6);
                column_width.push(6);
                column_width.push(6);
            }
            std::cmp::Ordering::Equal => column_width.push(6),
            std::cmp::Ordering::Less => (),
        };
        column_width.push(6);
        column_width.push(8);
        let separators = match table_type {
            TableType::AtomsCharge => vec![0, 0],
            TableType::BaderCharge => vec![],
        };
        Self { column_width,
               density_num,
               rows,
               separators,
               table_type }
    }
/// Creates a new structure and sets the minimum widths of each.
Creates a new structure and sets the minimum widths of each.
Creates a new structure and sets the minimum widths of each .
fn new(table_type: TableType, density_num: usize) -> Self {
        let rows = vec![Vec::with_capacity(0)];
        let mut column_width = Vec::with_capacity(6 + density_num);
        column_width.push(1);
        column_width.push(1);
        column_width.push(1);
        column_width.push(1);
        column_width.push(6);
        match density_num.cmp(&2) {
            std::cmp::Ordering::Greater => {
                column_width.push(6);
                column_width.push(6);
                column_width.push(6);
            }
            std::cmp::Ordering::Equal => column_width.push(6),
            std::cmp::Ordering::Less => (),
        };
        column_width.push(6);
        column_width.push(8);
        let separators = match table_type {
            TableType::AtomsCharge => vec![0, 0],
            TableType::BaderCharge => vec![],
        };
        Self { column_width,
               density_num,
               rows,
               separators,
               table_type }
    }
fn new ( table_type : TableType , density_num : usize ) -> Self { let rows = vec ! [ Vec with_capacity ( 0 ) ] ; let mut column_width = Vec :: with_capacity ( 6 + density_num ) ; column_width . push ( 1 ) ; column_width . push ( 1 ) ; column_width . push ( 1 ) ; column_width . push ( 1 ) ; column_width . push ( 6 ) ; match density_num . cmp ( & 2 ) { std :: cmp :: Ordering :: Greater => { column_width . push ( 6 ) ; column_width . push ( 6 ) ; column_width . push ( 6 ) ; } std :: cmp :: Ordering :: Equal => column_width . push ( 6 ) , std :: cmp :: Ordering :: Less => ( ) , } ; column_width . push ( 6 ) ; column_width . push ( 8 ) ; let separators = match table_type { TableType :: AtomsCharge => vec ! [ 0 0 ] , TableType :: BaderCharge => vec ! [ ] , } ; Self { column_width , density_num , rows , separators , table_type } }
Creates a new structure and sets the minimum widths of each.
Creates a new structure and sets the minimum widths of each .
table_type
TableType
density_num
usize
table_type
TableType
density_num
usize