Struct cppn::cppn::Cppn
[−]
[src]
pub struct Cppn<'a, N, L, EXTID> where
N: CppnNodeType + 'a,
L: Copy + Debug + Send + Sized + Into<f64> + 'a,
EXTID: Copy + Debug + Send + Sized + Ord + 'a, { /* fields omitted */ }
Represents a Compositional Pattern Producing Network (CPPN)
Methods
impl<'a, N, L, EXTID> Cppn<'a, N, L, EXTID> where
N: CppnNodeType + 'a,
L: Copy + Debug + Send + Sized + Into<f64> + 'a,
EXTID: Copy + Debug + Send + Sized + Ord + 'a,
[src]
N: CppnNodeType + 'a,
L: Copy + Debug + Send + Sized + Into<f64> + 'a,
EXTID: Copy + Debug + Send + Sized + Ord + 'a,
fn new(graph: &'a CppnGraph<N, L, EXTID>) -> Cppn<'a, N, L, EXTID>
[src]
fn incoming_signals(&self) -> &[f64]
[src]
fn calculate(&mut self, inputs: &[&[f64]]) -> Vec<f64>
[src]
Calculate all outputs
fn read_output(&self, nth_output: usize) -> Option<f64>
[src]
Reads the nth_output
of the network.
fn output_count(&self) -> usize
[src]
Returns the number of outputs
fn input_count(&self) -> usize
[src]
Returns the number of inputs
fn process(&mut self, inputs: &[&[f64]])
[src]
Process the network for the given inputs
. Outputs can be read after this call using
read_output
.
fn group_layers(&self) -> Vec<Vec<usize>>
[src]
Group the nodes into layers.