fn format_footer(&self,
                     vacuum_density: &[f64],
                     vacuum_volume: f64,
                     partitioned_density: &[f64],
                     partitioned_volume: f64)
                     -> String {
        match self.table_type {
            TableType::AtomsCharge => {
                let mut separator = self.format_separator(0);
                let footer = match self.density_num.cmp(&2) {
                        std::cmp::Ordering::Less => format!(
                            "\n  Vacuum Charge: {:>18.4}\n  Vacuum Volume: {:>18.4}\n  Partitioned Charge: {:>13.4}\n  Partitioned Volume: {:>13.4}",
                            vacuum_density[0],
                            vacuum_volume,
                            partitioned_density[0],
                            partitioned_volume,
                        ),
                        std::cmp::Ordering::Equal =>  format!(
                            "\n  Vacuum Charge: {:>18.4}\n  Vacuum Spin: {:>20.4}\n  Vacuum Volume: {:>18.4}\n  Partitioned Charge: {:>13.4}\n  Partitioned Spin: {:>15.4}\n  Partitioned Volume: {:>13.4}",
                            vacuum_density[0],
                            vacuum_density[1],
                            vacuum_volume,
                            partitioned_density[0],
                            partitioned_density[1],
                            partitioned_volume,
                        ),
                        std::cmp::Ordering::Greater =>  format!(
                            "\n  Vacuum Charge: {:>18.4}\n  Vacuum Spin X: {:>18.4}\n  Vacuum Spin Y: {:>18.4}\n  Vacuum Spin Z: {:>18.4}\n  Vacuum Volume: {:>18.4}\n  Partitioned Charge: {:>13.4}\n  Partitioned Spin X: {:>13.4}\n  Partitioned Spin Y: {:>13.4}\n  Partitioned Spin Z: {:>13.4}\n  Partitioned Volume: {:>13.4}",
                            vacuum_density[0],
                            vacuum_density[1],
                            vacuum_density[2],
                            vacuum_density[3],
                            vacuum_volume,
                            partitioned_density[0],
                            partitioned_density[1],
                            partitioned_density[2],
                            partitioned_density[3],
                            partitioned_volume,
                        ),
                };
                separator.push_str(&footer);
                separator
            }
            TableType::BaderCharge => String::new(),
        }
    }
/// Creates and formats the footer.
Creates and formats the footer.
Creates and formats the footer .
fn format_footer(&self,
                     vacuum_density: &[f64],
                     vacuum_volume: f64,
                     partitioned_density: &[f64],
                     partitioned_volume: f64)
                     -> String {
        match self.table_type {
            TableType::AtomsCharge => {
                let mut separator = self.format_separator(0);
                let footer = match self.density_num.cmp(&2) {
                        std::cmp::Ordering::Less => format!(
                            "\n  Vacuum Charge: {:>18.4}\n  Vacuum Volume: {:>18.4}\n  Partitioned Charge: {:>13.4}\n  Partitioned Volume: {:>13.4}",
                            vacuum_density[0],
                            vacuum_volume,
                            partitioned_density[0],
                            partitioned_volume,
                        ),
                        std::cmp::Ordering::Equal =>  format!(
                            "\n  Vacuum Charge: {:>18.4}\n  Vacuum Spin: {:>20.4}\n  Vacuum Volume: {:>18.4}\n  Partitioned Charge: {:>13.4}\n  Partitioned Spin: {:>15.4}\n  Partitioned Volume: {:>13.4}",
                            vacuum_density[0],
                            vacuum_density[1],
                            vacuum_volume,
                            partitioned_density[0],
                            partitioned_density[1],
                            partitioned_volume,
                        ),
                        std::cmp::Ordering::Greater =>  format!(
                            "\n  Vacuum Charge: {:>18.4}\n  Vacuum Spin X: {:>18.4}\n  Vacuum Spin Y: {:>18.4}\n  Vacuum Spin Z: {:>18.4}\n  Vacuum Volume: {:>18.4}\n  Partitioned Charge: {:>13.4}\n  Partitioned Spin X: {:>13.4}\n  Partitioned Spin Y: {:>13.4}\n  Partitioned Spin Z: {:>13.4}\n  Partitioned Volume: {:>13.4}",
                            vacuum_density[0],
                            vacuum_density[1],
                            vacuum_density[2],
                            vacuum_density[3],
                            vacuum_volume,
                            partitioned_density[0],
                            partitioned_density[1],
                            partitioned_density[2],
                            partitioned_density[3],
                            partitioned_volume,
                        ),
                };
                separator.push_str(&footer);
                separator
            }
            TableType::BaderCharge => String::new(),
        }
    }
fn format_footer ( & self , vacuum_density : & [ f64 ] , vacuum_volume : f64 , partitioned_density : & [ f64 ] , partitioned_volume : f64 ) -> String { match self . table_type { TableType :: AtomsCharge => { let mut separator = self . format_separator ( 0 ) ; let footer = match self . density_num . cmp ( & 2 ) { std :: cmp :: Ordering :: Less => format ! ( " \n \n \n \n " vacuum_density [ 0 ] vacuum_volume partitioned_density [ 0 ] partitioned_volume ) , std :: cmp :: Ordering :: Equal => format ! ( " \n \n \n \n \n \n " vacuum_density [ 0 ] vacuum_density [ 1 ] vacuum_volume partitioned_density [ 0 ] partitioned_density [ 1 ] partitioned_volume ) , std :: cmp :: Ordering :: Greater => format ! ( " \n \n \n \n \n \n \n \n \n \n " vacuum_density [ 0 ] vacuum_density [ 1 ] vacuum_density [ 2 ] vacuum_density [ 3 ] vacuum_volume partitioned_density [ 0 ] partitioned_density [ 1 ] partitioned_density [ 2 ] partitioned_density [ 3 ] partitioned_volume ) , } ; separator . push_str ( & footer ) ; separator } TableType :: BaderCharge => String :: new ( ) , } }
Creates and formats the footer.
Creates and formats the footer .
&self
vacuum_density
&[f64]
vacuum_volume
f64
partitioned_density
&[f64]
partitioned_volume
f64
&self
vacuum_density
&[f64]
vacuum_volume
f64
partitioned_density
&[f64]
partitioned_volume
f64