[−][src]Trait caminos_lib::pattern::Pattern
A Pattern
describes how a set of entities decides destinations into another set of entities.
The entities are initially servers, but after some operators it may mean router, rows/columns, or other agrupations.
The source and target set may be or not be the same. Or even be of different size.
Thus, a Pattern
is a generalization of the mathematical concept of function.
Required methods
pub fn initialize(
&mut self,
source_size: usize,
target_size: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
[src]
&mut self,
source_size: usize,
target_size: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
Fix the input and output size, providing the topology and random number generator. Careful with using toology in sub-patterns. For example, it may be misleading to use the dragonfly topology when building a pattern among groups or a pattern among the ruters of a single group. Even just a pattern of routers instead of a pattern of servers can lead to mistakes. Read the documentation of the traffic or meta-pattern using the pattern to know what its their input and output.
pub fn get_destination(
&self,
origin: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> usize
[src]
&self,
origin: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> usize
Obtain a destination of a source. This will be called repeteadly as the traffic requires destination for its messages.
Implementors
impl Pattern for CartesianTransform
[src]
pub fn initialize(
&mut self,
source_size: usize,
target_size: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
)
[src]
&mut self,
source_size: usize,
target_size: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
)
pub fn get_destination(
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize
[src]
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize
impl Pattern for ComponentsPattern
[src]
pub fn initialize(
&mut self,
_source_size: usize,
_target_size: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
[src]
&mut self,
_source_size: usize,
_target_size: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
pub fn get_destination(
&self,
origin: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> usize
[src]
&self,
origin: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> usize
impl Pattern for FileMap
[src]
pub fn initialize(
&mut self,
_source_size: usize,
_target_size: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
)
[src]
&mut self,
_source_size: usize,
_target_size: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
)
pub fn get_destination(
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize
[src]
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize
impl Pattern for ProductPattern
[src]
pub fn initialize(
&mut self,
source_size: usize,
target_size: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
[src]
&mut self,
source_size: usize,
target_size: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
pub fn get_destination(
&self,
origin: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> usize
[src]
&self,
origin: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> usize
impl Pattern for RandomInvolution
[src]
pub fn initialize(
&mut self,
source_size: usize,
target_size: usize,
_topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
[src]
&mut self,
source_size: usize,
target_size: usize,
_topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
pub fn get_destination(
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize
[src]
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize
impl Pattern for RandomPermutation
[src]
pub fn initialize(
&mut self,
source_size: usize,
target_size: usize,
_topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
[src]
&mut self,
source_size: usize,
target_size: usize,
_topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
)
pub fn get_destination(
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize
[src]
&self,
origin: usize,
_topology: &Box<dyn Topology>,
_rng: &RefCell<StdRng>
) -> usize