summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphology/README.md2
-rw-r--r--morphology/examples/test_all_sorting_options.rs12
-rw-r--r--morphology/examples/test_length_sorting.rs2
-rw-r--r--morphology/src/sequence.rs6
4 files changed, 11 insertions, 11 deletions
diff --git a/morphology/README.md b/morphology/README.md
index 31c1e16..898c606 100644
--- a/morphology/README.md
+++ b/morphology/README.md
@@ -180,7 +180,7 @@ let set = ValidSet::new()
// Generate all valid sequences of length 3 from this set
let mut sequences = generate_sequences(&set, 3);
-// Sort with defaults (InterpolateLength, Forward, DepthFirst, IncreasingPositiveFirst)
+// Sort with defaults (SegregateLength, Forward, DepthFirst, IncreasingPositiveFirst)
sort_sequences(&mut sequences, None);
// Sort with custom options using builder pattern
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)
diff --git a/morphology/src/sequence.rs b/morphology/src/sequence.rs
index 4fcf70e..8f15c7c 100644
--- a/morphology/src/sequence.rs
+++ b/morphology/src/sequence.rs
@@ -467,11 +467,11 @@ pub enum SortingDirection {
/// Defines how sequences of different lengths are sorted.
#[derive(Debug, Clone, Copy, Default)]
pub enum LengthSorting {
- /// Sequences of different lengths are sorted together by content
- #[default]
- InterpolateLength,
/// Sequences are grouped by length, shorter sequences first
+ #[default]
SegregateLength,
+ /// Sequences of different lengths are sorted together by content
+ InterpolateLength,
}
/// Configuration options for sequence generation and sorting.