Struct genotype::param_set::ParamSet3d [−][src]
pub struct ParamSet3d<P: RangedParam> { pub x: P, pub y: P, pub z: P, }
A 3D parameter set containing x, y and z fields.
Fields
x: P
y: P
z: P
Methods
impl<P: RangedParam> ParamSet3d<P>
[src]
impl<P: RangedParam> ParamSet3d<P>
pub fn new(x: P, y: P, z: P) -> Self
[src]
pub fn new(x: P, y: P, z: P) -> Self
Creates a new parameter set with the given values.
pub fn components_scaled(&self) -> (Param, Param, Param)
[src]
pub fn components_scaled(&self) -> (Param, Param, Param)
Returns a tuple that contains each parameter, scaled with get_scaled
Trait Implementations
impl<P: Debug + RangedParam> Debug for ParamSet3d<P>
[src]
impl<P: Debug + RangedParam> Debug for ParamSet3d<P>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<P: Copy + RangedParam> Copy for ParamSet3d<P>
[src]
impl<P: Copy + RangedParam> Copy for ParamSet3d<P>
impl<P: Clone + RangedParam> Clone for ParamSet3d<P>
[src]
impl<P: Clone + RangedParam> Clone for ParamSet3d<P>
fn clone(&self) -> ParamSet3d<P>
[src]
fn clone(&self) -> ParamSet3d<P>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<P: RangedParam> ParamSet<P> for ParamSet3d<P>
[src]
impl<P: RangedParam> ParamSet<P> for ParamSet3d<P>
impl<P: RangedParam> ParamHolder for ParamSet3d<P>
[src]
impl<P: RangedParam> ParamHolder for ParamSet3d<P>
fn param_count(&self) -> usize
[src]
fn param_count(&self) -> usize
The number of parameters/genes on this chromosone.
fn get_param(&mut self, index: usize) -> &mut RangedParam
[src]
fn get_param(&mut self, index: usize) -> &mut RangedParam
Returns a mutable reference to the gene at the given index. # Panics If index >= self.param_count()
Read more
Auto Trait Implementations
impl<P> Send for ParamSet3d<P> where
P: Send,
impl<P> Send for ParamSet3d<P> where
P: Send,
impl<P> Sync for ParamSet3d<P> where
P: Sync,
impl<P> Sync for ParamSet3d<P> where
P: Sync,