pub struct ComposePipeline<T> {
pub anchor: Box<dyn Anchor>,
pub objective: Box<dyn Objective<T>>,
pub selector: Box<dyn Selector<T>>,
}Expand description
Pipeline that scores candidates with an objective then packs to budget via a selector.
Fields§
§anchor: Box<dyn Anchor>§objective: Box<dyn Objective<T>>§selector: Box<dyn Selector<T>>Implementations§
Source§impl<T: Clone + Send + Sync + 'static> ComposePipeline<T>
impl<T: Clone + Send + Sync + 'static> ComposePipeline<T>
Sourcepub fn execute(
&self,
_graph: &AnchorGraph,
candidates: Vec<SelectorInput<T>>,
budget: usize,
weights: &SelectorWeights,
context: &ObjectiveContext,
) -> Result<SelectorOutput<T>, FoldError>
pub fn execute( &self, _graph: &AnchorGraph, candidates: Vec<SelectorInput<T>>, budget: usize, weights: &SelectorWeights, context: &ObjectiveContext, ) -> Result<SelectorOutput<T>, FoldError>
Score candidates with the objective, then pack under budget with the selector.
Auto Trait Implementations§
impl<T> Freeze for ComposePipeline<T>
impl<T> !RefUnwindSafe for ComposePipeline<T>
impl<T> Send for ComposePipeline<T>
impl<T> Sync for ComposePipeline<T>
impl<T> Unpin for ComposePipeline<T>
impl<T> UnsafeUnpin for ComposePipeline<T>
impl<T> !UnwindSafe for ComposePipeline<T>
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