pub struct Stats { /* private fields */ }Expand description
The ABC metric.
The ABC metric measures the size of a source code by counting
the number of Assignments (A), Branches (B) and Conditions (C).
The metric defines an ABC score as a vector of three elements (<A,B,C>).
The ABC score can be represented by its individual components (A, B and C)
or by the magnitude of the vector (|<A,B,C>| = sqrt(A^2 + B^2 + C^2)).
Official paper and definition:
Fitzpatrick, Jerry (1997). “Applying the ABC metric to C, C++ and Java”. C++ Report. https://www.softwarerenovation.com/Articles.aspx
Implementations§
Source§impl Stats
impl Stats
Sourcepub fn assignments(&self) -> f64
pub fn assignments(&self) -> f64
Returns the Abc assignments metric value.
Sourcepub fn assignments_sum(&self) -> f64
pub fn assignments_sum(&self) -> f64
Returns the Abc assignments sum metric value.
Sourcepub fn assignments_average(&self) -> f64
pub fn assignments_average(&self) -> f64
Returns the Abc assignments average value.
This value is computed dividing the Abc
assignments value for the number of spaces.
Sourcepub fn assignments_min(&self) -> f64
pub fn assignments_min(&self) -> f64
Returns the Abc assignments minimum value.
Sourcepub fn assignments_max(&self) -> f64
pub fn assignments_max(&self) -> f64
Returns the Abc assignments maximum value.
Sourcepub fn branches_sum(&self) -> f64
pub fn branches_sum(&self) -> f64
Returns the Abc branches sum metric value.
Sourcepub fn branches_average(&self) -> f64
pub fn branches_average(&self) -> f64
Returns the Abc branches average value.
This value is computed dividing the Abc
branches value for the number of spaces.
Sourcepub fn branches_min(&self) -> f64
pub fn branches_min(&self) -> f64
Returns the Abc branches minimum value.
Sourcepub fn branches_max(&self) -> f64
pub fn branches_max(&self) -> f64
Returns the Abc branches maximum value.
Sourcepub fn conditions(&self) -> f64
pub fn conditions(&self) -> f64
Returns the Abc conditions metric value.
Sourcepub fn conditions_sum(&self) -> f64
pub fn conditions_sum(&self) -> f64
Returns the Abc conditions sum metric value.
Sourcepub fn conditions_average(&self) -> f64
pub fn conditions_average(&self) -> f64
Returns the Abc conditions average value.
This value is computed dividing the Abc
conditions value for the number of spaces.
Sourcepub fn conditions_min(&self) -> f64
pub fn conditions_min(&self) -> f64
Returns the Abc conditions minimum value.
Sourcepub fn conditions_max(&self) -> f64
pub fn conditions_max(&self) -> f64
Returns the Abc conditions maximum value.
Sourcepub fn magnitude_sum(&self) -> f64
pub fn magnitude_sum(&self) -> f64
Returns the Abc magnitude sum metric value.