Struct caminos_lib::policies::OccupancyFunction [−][src]
pub struct OccupancyFunction { /* fields omitted */ }
Expand description
Transform (l,q) into new label al+bq+clq+d where l is the label and q is the occupancy.
Implementations
Trait Implementations
fn filter(
&self,
candidates: Vec<CandidateEgress>,
router: &dyn Router,
info: &RequestInfo<'_>,
topology: &dyn Topology,
_rng: &RefCell<StdRng>
) -> Vec<CandidateEgress>
fn filter(
&self,
candidates: Vec<CandidateEgress>,
router: &dyn Router,
info: &RequestInfo<'_>,
topology: &dyn Topology,
_rng: &RefCell<StdRng>
) -> Vec<CandidateEgress>
Apply the policy over a list of candidates and return the candidates that fulfil the policy requirements. candidates: the list to be filtered. router: the router in which the decision is being made. topology: The network topology. rng: the global random number generator. Read more