Struct boolnetevo::Evolver[][src]

pub struct Evolver { /* fields omitted */ }

Container of evolution process components.

Implementations

impl Evolver[src]

pub fn arch(
    &mut self,
    height: usize,
    size: usize,
    rands: usize,
    layers: usize,
    cycles: usize
) -> Result<(), String>
[src]

Changes boolnet architecture.

impl Evolver[src]

pub fn bitran(
    &mut self,
    register: &BitransformRegister,
    id: &str,
    prefs: &[usize]
) -> Result<(), String>
[src]

Changes Bitransform to one present in register or shows all that are there.

impl Evolver[src]

pub fn dir(&mut self, dir_inp_hex: &str) -> Result<String, String>[src]

Calculates direct bitstring function of Bitransform for given hex-string input, as hex-string output.

impl Evolver[src]

pub fn evol(&mut self, epochs: usize) -> Result<(), String>[src]

Evolves population until any key is pressed (epochs = 0) or for given number of epochs. Outputs to terminal and to log if logging is on.

impl Evolver[src]

pub fn help(&self, command: &str)[src]

Lists available commands or shows usage of a command.

impl Evolver[src]

pub fn par(&mut self, param: &str, valstr: &str) -> Result<(), String>[src]

Changes evolution parameter.

impl Evolver[src]

pub fn pop(&mut self, size: usize) -> Result<(), String>[src]

Changes population size.

impl Evolver[src]

pub fn reset(&mut self) -> Result<(), String>[src]

Resets population.

impl Evolver[src]

pub fn run(&mut self, bn_ind: usize, inp_hex: &str) -> Result<String, String>[src]

Runs given boolnet with given hex-string input to obtain hex-string output.

impl Evolver[src]

pub fn save(&self, dirpath: &str) -> Result<(), String>[src]

Saves evolver to dir. dirpath cannot start with "/" due to safety reasons.

pub fn load(
    register: &BitransformRegister,
    dirpath: &str
) -> Result<Self, String>
[src]

Loads evolver from dir.

impl Evolver[src]

pub fn set(&mut self, setting: &str, valstr: &str) -> Result<(), String>[src]

Changes setting.

impl Evolver[src]

pub fn stat(&self) -> Result<(), String>[src]

Shows statistics.

impl Evolver[src]

pub fn new_default(register: &BitransformRegister) -> Result<Self, String>[src]

register must contain at least the entry about default Bitransform, InvXor.

pub fn shell(&mut self, register: &BitransformRegister) -> Result<(), String>[src]

Control evolution from basic shell. No history or autocompletion of commands... yet.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,