Struct vrp_core::models::problem::FeatureBuilder
source · pub struct FeatureBuilder { /* private fields */ }Expand description
Provides a way to build feature with some checks.
Implementations§
source§impl FeatureBuilder
impl FeatureBuilder
sourcepub fn combine(name: &str, features: &[Feature]) -> Result<Feature, String>
pub fn combine(name: &str, features: &[Feature]) -> Result<Feature, String>
Combines multiple features into one.
sourcepub fn from_feature(other: Feature) -> Self
pub fn from_feature(other: Feature) -> Self
Creates a builder from another feature
sourcepub fn with_constraint<T: FeatureConstraint + Send + Sync + 'static>(
self,
constraint: T
) -> Self
pub fn with_constraint<T: FeatureConstraint + Send + Sync + 'static>(
self,
constraint: T
) -> Self
Adds given constraint.
sourcepub fn with_objective<T: FeatureObjective<Solution = InsertionContext> + Send + Sync + 'static>(
self,
objective: T
) -> Self
pub fn with_objective<T: FeatureObjective<Solution = InsertionContext> + Send + Sync + 'static>(
self,
objective: T
) -> Self
Adds given objective.
sourcepub fn with_state<T: FeatureState + Send + Sync + 'static>(
self,
state: T
) -> Self
pub fn with_state<T: FeatureState + Send + Sync + 'static>(
self,
state: T
) -> Self
Adds given state.
Trait Implementations§
source§impl Default for FeatureBuilder
impl Default for FeatureBuilder
source§fn default() -> FeatureBuilder
fn default() -> FeatureBuilder
Returns the “default value” for a type. Read more