1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Change-coupling result types stored in [`super::snapshot::Snapshot`].
use ;
/// A single file-pair that co-changes above the configured minimum frequency.
///
/// # Examples
///
/// ```rust
/// use sdivi_snapshot::change_coupling::CoChangePair;
///
/// let pair = CoChangePair {
/// source: "src/a.rs".to_string(),
/// target: "src/b.rs".to_string(),
/// frequency: 0.8,
/// cochange_count: 4,
/// };
/// assert!(pair.source < pair.target);
/// ```
/// Result of the change-coupling analysis for one snapshot.
///
/// `None` in the snapshot when the repo has no git history or
/// `history_depth = 0` was configured.
///
/// # Examples
///
/// ```rust
/// use sdivi_snapshot::change_coupling::ChangeCouplingResult;
///
/// let result = ChangeCouplingResult {
/// pairs: vec![],
/// commits_analyzed: 0,
/// distinct_files_touched: 0,
/// };
/// assert_eq!(result.commits_analyzed, 0);
/// ```