Trait boolnetevo::Bitransform [−][src]
Provides methods around certain bitstring function to use it for evolution of boolnet population.
Required methods
fn id() -> String where
Self: Sized,
[src]
Self: Sized,
Key to get entry about this Bitransform from BitransformRegister instance and set Evolver to this Bitransform's instance.
fn info() -> String where
Self: Sized,
[src]
Self: Sized,
Short info about this Bitransform: input, output, preferences.
fn new(prefs: &[usize]) -> Result<Box<dyn Bitransform>, String> where
Self: Sized,
[src]
Self: Sized,
Constructor, provided with bitransform's preferences.
fn desc(&self) -> BitransformDesc
[src]
Make serializable description of this bitransform's preferences.
fn dir_inp_size(&self) -> usize
[src]
Size of input to direct bitstring function in bits.
fn inp_size(&self) -> usize
[src]
Boolnet input size in bits.
fn outp_size(&self) -> usize
[src]
Boolnet output size in bits.
fn dir_func(&self, args: &[u128]) -> Vec<u128>
[src]
Calculate underlying (direct) bitstring function for args
batch.
fn rand_inp(&self, rng: &mut ThreadRng) -> Vec<u128>
[src]
Make random input batch.
The length of batch elements must be inp_size()
.
fn score_inp_outp(&self, inp: &[u128], outp: &[u128]) -> f64
[src]
Score output batch, in regard to input batch and underlying bitstring function. Usually the score is the mean number of different bits in some 2 bitstrings.
Provided methods
fn reg_entry(
) -> (String, fn() -> String, fn(_: &[usize]) -> Result<Box<dyn Bitransform>, String>) where
Self: Sized,
[src]
) -> (String, fn() -> String, fn(_: &[usize]) -> Result<Box<dyn Bitransform>, String>) where
Self: Sized,
Makes entry about this Bitransform
to be added to BitransformRegister
instance.