#include <GraphNeuralNetwork.h>
Inheritance diagram for Teem::GraphNeuralNetwork:
Public Member Functions | |
GraphNeuralNetwork (const Graph &graph, const std::string &root="teem.nn") | |
Constructor, create this neural network using graph as a description. | |
virtual | ~GraphNeuralNetwork () |
Destructor, delete neurons and synapses. | |
virtual void | setInput (unsigned index, double val) |
Set the input index to value val . | |
virtual double | getOutput (unsigned index) |
Return the value of output index . | |
virtual void | step () |
Do a step, process inputs and compute outputs. | |
Neuron * | getNeuron (size_t index) |
Get a neuron by index. | |
Neuron * | getNeuron (const std::string &tag, size_t index) |
Get a neuron from a tagged list by index. | |
std::valarray< Neuron * > & | getTaggedNeurons (const std::string &tag) |
Get an array of tagged neurons. | |
size_t | neuronNum () const |
Total number of neuron. | |
size_t | neuronNum (const std::string &tag) const |
Number of neuron in a tagged list. | |
Synapse * | getSynapse (size_t index) |
Get a synapse by index. | |
Synapse * | getSynapse (const std::string &tag, size_t index) |
Get a synapse from a tagged list by index. | |
std::valarray< Synapse * > & | getTaggedSynapses (const std::string &tag) |
Get an array of tagged synapses. | |
size_t | synapseNum () const |
Total number of synapse. | |
size_t | synapseNum (const std::string &tag) const |
Number of synapse in a tagged list. | |
Protected Attributes | |
std::valarray< Neuron * > | neurons |
All neurons. | |
std::valarray< Synapse * > | synapses |
All synapses. | |
std::map< std::string, std::valarray< Neuron * > > | neuronLists |
Neuron tagged lists. | |
std::map< std::string, std::valarray< Synapse * > > | synapseLists |
Synapse tagged lists. | |
std::valarray< InputNeuron * > | inputNeurons |
Cached input neurons (for performances). | |
std::valarray< Neuron * > * | outputNeurons |
Cached output neurons (for performances). This is just a pointer to neuronLists ["output"]. |
|
Cached input neurons (for performances).
This is a copy of |