Refactor algorithms to use configuration flags

Introduce boolean flags for `AlignmentReducer` and `PairwiseReducer` to control behavior. Update masking logic and introduce the `SurvivingFamily` structure for explicit data handling.
This commit is contained in:
Eric Coissac committed 2026-10-13 08:44:19 +02:00
1 parent cd06fa2ce3
commit 996ebaf977
6 files changed
+114 -124

No files matched your search

+3 -5
View File
@@ -275,11 +275,9 @@ pub fn run(args: PhyloArgs) {
std::process::exit(1);
}
let mut alignment_reducer = need_alignment.then(|| {
obikphylo::siblings::AlignmentReducer::new(&cache, &snp_exclude_mask, args.free_loss, args.no_ambiguity)
});
let mut pairwise_reducer =
need_pairwise.then(|| obikphylo::siblings::PairwiseReducer::new(n, args.free_loss, args.no_ambiguity));
let mut alignment_reducer =
need_alignment.then(|| obikphylo::siblings::AlignmentReducer::new(&cache, &snp_exclude_mask));
let mut pairwise_reducer = need_pairwise.then(|| obikphylo::siblings::PairwiseReducer::new(n));
if need_alignment || need_pairwise {
let mut reducers: Vec<&mut dyn obikphylo::siblings::LayerReducer> = Vec::new();