Struct rust_code_analysis::npa::Stats
source · pub struct Stats { /* private fields */ }
Expand description
The Npa
metric.
This metric counts the number of public attributes of classes/interfaces.
Implementations§
source§impl Stats
impl Stats
sourcepub fn interface_npa(&self) -> f64
pub fn interface_npa(&self) -> f64
Returns the number of interface public attributes in a space.
sourcepub fn interface_na(&self) -> f64
pub fn interface_na(&self) -> f64
Returns the number of interface attributes in a space.
sourcepub fn class_npa_sum(&self) -> f64
pub fn class_npa_sum(&self) -> f64
Returns the number of class public attributes sum in a space.
sourcepub fn interface_npa_sum(&self) -> f64
pub fn interface_npa_sum(&self) -> f64
Returns the number of interface public attributes sum in a space.
sourcepub fn class_na_sum(&self) -> f64
pub fn class_na_sum(&self) -> f64
Returns the number of class attributes sum in a space.
sourcepub fn interface_na_sum(&self) -> f64
pub fn interface_na_sum(&self) -> f64
Returns the number of interface attributes sum in a space.
sourcepub fn class_cda(&self) -> f64
pub fn class_cda(&self) -> f64
Returns the class Cda
metric value
The Class Data Accessibility
metric value for a class
is computed by dividing the Npa
value of the class
by the total number of attributes defined in the class.
This metric is an adaptation of the Classified Class Data Accessibility
(CCDA
)
security metric for not classified attributes.
Paper: https://ieeexplore.ieee.org/abstract/document/5381538
sourcepub fn interface_cda(&self) -> f64
pub fn interface_cda(&self) -> f64
Returns the interface Cda
metric value
The Class Data Accessibility
metric value for an interface
is computed by dividing the Npa
value of the interface
by the total number of attributes defined in the interface.
This metric is an adaptation of the Classified Class Data Accessibility
(CCDA
)
security metric for not classified attributes.
Paper: https://ieeexplore.ieee.org/abstract/document/5381538
sourcepub fn total_cda(&self) -> f64
pub fn total_cda(&self) -> f64
Returns the total Cda
metric value
The total Class Data Accessibility
metric value
is computed by dividing the total Npa
value
by the total number of attributes.
This metric is an adaptation of the Classified Class Data Accessibility
(CCDA
)
security metric for not classified attributes.
Paper: https://ieeexplore.ieee.org/abstract/document/5381538