#[non_exhaustive]pub enum LcomMetric {
Lcom96a,
Lcom96b,
Lcom1,
Lcom2,
Lcom3,
Lcom4,
Lcom5,
LcomStar,
}Expand description
One formula in the lack-of-cohesion-of-methods family.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Lcom96a
Henderson-Sellers normalized method/field distance, 1996a spelling.
Lcom96b
Henderson-Sellers method/field density complement, 1996b spelling.
Lcom1
Difference between non-sharing and sharing method-pair counts.
Lcom2
Method/field density complement.
Lcom3
Normalized method/field distance.
Lcom4
Connected components in the shared-field method graph.
Lcom5
Henderson-Sellers normalized method/field distance.
LcomStar
LCOM-star normalized method/field distance.
Implementations§
Source§impl LcomMetric
impl LcomMetric
Sourcepub const fn description(self) -> &'static str
pub const fn description(self) -> &'static str
Returns the formula’s stable description.
Sourcepub fn calculate(self, input: &LcomInput) -> f64
pub fn calculate(self, input: &LcomInput) -> f64
Calculates this formula over a prepared method/field incidence relation.
Zero methods produce zero for every formula. One method produces one only for LCOM4 and zero otherwise. With multiple methods and no fields, normalized/density formulas produce zero, while LCOM1 and LCOM4 retain their method-pair and component meanings.
Trait Implementations§
Source§impl Clone for LcomMetric
impl Clone for LcomMetric
Source§fn clone(&self) -> LcomMetric
fn clone(&self) -> LcomMetric
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LcomMetric
impl Debug for LcomMetric
Source§impl Display for LcomMetric
impl Display for LcomMetric
Source§impl Hash for LcomMetric
impl Hash for LcomMetric
Source§impl Ord for LcomMetric
impl Ord for LcomMetric
Source§fn cmp(&self, other: &LcomMetric) -> Ordering
fn cmp(&self, other: &LcomMetric) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LcomMetric
impl PartialEq for LcomMetric
Source§impl PartialOrd for LcomMetric
impl PartialOrd for LcomMetric
impl Copy for LcomMetric
impl Eq for LcomMetric
impl StructuralPartialEq for LcomMetric
Auto Trait Implementations§
impl Freeze for LcomMetric
impl RefUnwindSafe for LcomMetric
impl Send for LcomMetric
impl Sync for LcomMetric
impl Unpin for LcomMetric
impl UnwindSafe for LcomMetric
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.