[][src]Struct radiate::models::neat::edge::Edge

pub struct Edge {
    pub id: EdgeId,
    pub innov: Uuid,
    pub src: NeuronId,
    pub dst: NeuronId,
    pub weight: f32,
    pub active: bool,
}

Edge is a connection between two nodes in the graph

Src is the innovation number of the node sending input through the network dst is the innovation number of the node receiving the input from the src neuron innov is the edge's unique innovation number for crossover and mutation weight is the weight of the connection active keeps track of if this edge is active or not, meaning it will be used while feeding data through the network

Fields

id: EdgeIdinnov: Uuidsrc: NeuronIddst: NeuronIdweight: f32active: bool

Implementations

impl Edge[src]

pub fn new(
    id: EdgeId,
    src: NeuronId,
    dst: NeuronId,
    weight: f32,
    active: bool
) -> Self
[src]

pub fn update(&mut self, delta: f32, nodes: &mut [Neuron])[src]

update the weight of this edge connection

pub fn calculate(&self, val: f32) -> f32[src]

calculate the eligibility of this connection and store it for time series predictions

pub fn update_weight(&mut self, weight: f32, nodes: &mut [Neuron])[src]

update weight

Link edge src/dst nodes

pub fn enable(&mut self, nodes: &mut [Neuron])[src]

Enable edge and link the nodes.

pub fn disable(&mut self, nodes: &mut [Neuron])[src]

Disable edge and unlink the nodes.

Trait Implementations

impl Clone for Edge[src]

impl Debug for Edge[src]

impl<'de> Deserialize<'de> for Edge[src]

impl PartialEq<Edge> for Edge[src]

impl Serialize for Edge[src]

impl StructuralPartialEq for Edge[src]

Auto Trait Implementations

impl RefUnwindSafe for Edge

impl Send for Edge

impl Sync for Edge

impl Unpin for Edge

impl UnwindSafe for Edge

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,