From ef8a111e9e86d68243f0e0e49a412755b4179aae Mon Sep 17 00:00:00 2001 From: jacksonfu14 Date: Wed, 12 Nov 2025 06:52:48 +0100 Subject: make segrate lengths default for sorting --- morphology/examples/test_all_sorting_options.rs | 12 ++++++------ morphology/examples/test_length_sorting.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'morphology/examples') diff --git a/morphology/examples/test_all_sorting_options.rs b/morphology/examples/test_all_sorting_options.rs index 2b60b3f..e5e796f 100644 --- a/morphology/examples/test_all_sorting_options.rs +++ b/morphology/examples/test_all_sorting_options.rs @@ -33,14 +33,14 @@ fn main() { // Example 1: All defaults let mut test1 = sequences.clone(); sort_sequences(&mut test1, None); - print_sequences("Defaults (InterpolateLength, Forward, DepthFirst, IncreasingPositiveFirst)", &test1); + print_sequences("Defaults (SegregateLength, Forward, DepthFirst, IncreasingPositiveFirst)", &test1); - // Example 2: SegregateLength only + // Example 2: InterpolateLength only let mut test2 = sequences.clone(); let opts = SequenceOptions::new() - .length_sorting(LengthSorting::SegregateLength); + .length_sorting(LengthSorting::InterpolateLength); sort_sequences(&mut test2, opts); - print_sequences("SegregateLength + defaults", &test2); + print_sequences("InterpolateLength + defaults", &test2); // Example 3: BreadthFirst + Backward let mut test3 = sequences.clone(); @@ -48,7 +48,7 @@ fn main() { .sorting_method(SortingMethod::BreadthFirst) .sorting_direction(SortingDirection::Backward); sort_sequences(&mut test3, opts); - print_sequences("BreadthFirst + Backward + InterpolateLength", &test3); + print_sequences("BreadthFirst + Backward + SegregateLength", &test3); // Example 4: All custom options combined let mut test4 = sequences.clone(); @@ -62,7 +62,7 @@ fn main() { print_sequences("All custom: SegregateLength + Backward + BreadthFirst + custom precedence", &test4); println!("\n=== Complete Sorting Options ==="); - println!("LengthSorting: InterpolateLength (default) | SegregateLength"); + println!("LengthSorting: SegregateLength (default) | InterpolateLength"); println!("SortingDirection: Forward (default) | Backward"); println!("SortingMethod: DepthFirst (default) | BreadthFirst"); println!("PrecedenceOrder: IncreasingPositiveFirst (default) | IncreasingNegativeFirst"); diff --git a/morphology/examples/test_length_sorting.rs b/morphology/examples/test_length_sorting.rs index 2163e50..1dff8f5 100644 --- a/morphology/examples/test_length_sorting.rs +++ b/morphology/examples/test_length_sorting.rs @@ -34,7 +34,7 @@ fn main() { print_sequences("Original sequences", &sequences); - // Test InterpolateLength (default) - sequences sorted by content, length mixed in + // Test InterpolateLength (explicitly set) - sequences sorted by content, length mixed in let mut interpolate = sequences.clone(); let opts = SequenceOptions::new() .length_sorting(LengthSorting::InterpolateLength) -- cgit v1.2.3