pub struct RoutingCriteria {
pub distance_weight: f64,
pub time_weight: f64,
pub monetary_weight: f64,
pub custom_weights: HashMap<String, f64>,
}Expand description
Multi-criteria weight specification
Fields§
§distance_weight: f64Weight for distance (0.0 to 1.0)
time_weight: f64Weight for travel time (0.0 to 1.0)
monetary_weight: f64Weight for monetary cost (0.0 to 1.0)
custom_weights: HashMap<String, f64>Custom weights
Implementations§
Source§impl RoutingCriteria
impl RoutingCriteria
Sourcepub fn to_weight_criteria(&self) -> HashMap<String, f64>
pub fn to_weight_criteria(&self) -> HashMap<String, f64>
Convert to weight criteria map for ShortestPathOptions
Trait Implementations§
Source§impl Clone for RoutingCriteria
impl Clone for RoutingCriteria
Source§fn clone(&self) -> RoutingCriteria
fn clone(&self) -> RoutingCriteria
Returns a duplicate of the value. Read more
1.0.0 · 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 RoutingCriteria
impl Debug for RoutingCriteria
Auto Trait Implementations§
impl Freeze for RoutingCriteria
impl RefUnwindSafe for RoutingCriteria
impl Send for RoutingCriteria
impl Sync for RoutingCriteria
impl Unpin for RoutingCriteria
impl UnsafeUnpin for RoutingCriteria
impl UnwindSafe for RoutingCriteria
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