pub struct CoChangePair {
pub path_a: PathBuf,
pub path_b: PathBuf,
pub revisions_a: u32,
pub revisions_b: u32,
pub shared_revisions: u32,
pub degree: f64,
}Expand description
A pair of files that change together. path_a sorts before path_b.
Fields§
§path_a: PathBufFirst file (absolute path).
path_b: PathBufSecond file (absolute path).
revisions_a: u32Commits that change path_a.
revisions_b: u32Commits that change path_b.
Commits that change both files.
degree: f64shared_revisions divided by the mean of the two revision counts, in
[0, 1], rounded to two decimals.
Implementations§
Source§impl CoChangePair
impl CoChangePair
Sourcepub fn is_strong(&self) -> bool
pub fn is_strong(&self) -> bool
True when the degree reaches STRONG_COUPLING_DEGREE.
Sourcepub fn partner_of(&self, path: &Path) -> Option<&Path>
pub fn partner_of(&self, path: &Path) -> Option<&Path>
The other file of the pair, when path is one of the two files.
Trait Implementations§
Source§impl Clone for CoChangePair
impl Clone for CoChangePair
Source§impl Debug for CoChangePair
impl Debug for CoChangePair
Source§impl PartialEq for CoChangePair
impl PartialEq for CoChangePair
impl StructuralPartialEq for CoChangePair
Auto Trait Implementations§
impl Freeze for CoChangePair
impl RefUnwindSafe for CoChangePair
impl Send for CoChangePair
impl Sync for CoChangePair
impl Unpin for CoChangePair
impl UnsafeUnpin for CoChangePair
impl UnwindSafe for CoChangePair
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more