pub struct MergePolicy {
pub limit: usize,
pub normalization: ScoreNormalization,
pub multi_leg_boost: f64,
}Expand description
Merge policy for combining results from multiple route legs.
The merge pipeline:
- Collect — gather raw results from each leg
- Fuse duplicates — merge duplicates by source identity, preserving provenance from all contributing legs (union of source legs, best score)
- Normalize — bring scores to a common scale
- Boost — apply multi-leg support boost to fused results
- Rank — order by final score descending
- Truncate — apply the final limit
Fields§
§limit: usizeFinal result limit after merge.
normalization: ScoreNormalizationHow to handle score normalization across legs.
multi_leg_boost: f64Boost factor applied to results that appeared in multiple legs.
Each additional leg multiplies the score by (1.0 + multi_leg_boost).
Set to 0.0 to disable boosting.
Trait Implementations§
Source§impl Clone for MergePolicy
impl Clone for MergePolicy
Source§fn clone(&self) -> MergePolicy
fn clone(&self) -> MergePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MergePolicy
impl Debug for MergePolicy
Source§impl Default for MergePolicy
impl Default for MergePolicy
Source§impl<'de> Deserialize<'de> for MergePolicy
impl<'de> Deserialize<'de> for MergePolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MergePolicy
impl RefUnwindSafe for MergePolicy
impl Send for MergePolicy
impl Sync for MergePolicy
impl Unpin for MergePolicy
impl UnsafeUnpin for MergePolicy
impl UnwindSafe for MergePolicy
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