Main Page | Namespace List | Data Structures | File List | Data Fields | Globals

Network Class Reference

#include <network.h>

Collaboration diagram for Network:

Collaboration graph
[legend]

Public Member Functions

 Network ()
int getnextfreeid (void)
void setnextfreeid (int id)
LayergetInputLayer (void)
LayergetOutputLayer (void)
list< Layer * > * getHiddenLayers (void)
list< Axon * > * getAxons (void)
int getNbNeurons (int id_layer)
int getHiddenLayerId (int i)
int getHiddenLayerPos (int id)
LayergetLayer (int id_l)
NeurongetNeuronFromId (int id_neur)
int getLayerNumTheNeuronIsOn (int id_neur)
int getLayerNumFromLayerId (int id_layer)
float getK ()
void setK (float _k)
int getEPS ()
void setEPS (int e)
int getCurrentEpoch ()
double getCurrentAverageError ()
vector< double > * getErrorEvolution ()
int shininess (void)
float neuronsize (void)
float axonsize (void)
float getVStep (void)
bool displayaxons (void)
bool displayneurons (void)
bool displaylayers (void)
bool displayvalues (void)
void setDisplayAxons (bool display)
void setDisplayNeurons (bool display)
void setDisplayLayers (bool display)
void setDisplayValues (bool display)
ManipulatedFrame * frame (int id)
void setShininess (int shiny)
void draw (int selected, const bool names=false)
int nbHiddenLayers ()
int nbLayers ()
void addHiddenLayer ()
void addHiddenLayer (int id)
void addNHiddenLayers (int n)
void removeHiddenLayer (int id_layer)
void clearLayer (int id_layer)
void clearHiddenLayers ()
bool existLayer (int id_layer)
void addNeuron (int id_layer)
void addNeuron (int id_layer, int id, float x, float z)
void addNNeurons (int id_layer, int n)
void removeNeuron (int id_neur)
int nbNeurons (void)
bool existNeuron (int id_neur)
int nbAxons (void)
void addAxon (int id_neur1, int id_neur2)
void addAxon (int id, int id_neur1, int id_neur2)
void addAxon (int id, int id_neur1, int id_neur2, double weight)
void removeAxon (int id_ax, bool b)
void removeAxons ()
bool existAxon (int id_ax)
bool existAxon (int id_neur_in, int id_neur_out)
void resetAllValues ()
void resetTempValues ()
void initLayerIn (vector< double > in)
void forwardPropagation ()
vector< double > * getOutValues ()
vector< double > * computeOut (vector< double > *in)
double computeErrorRate (vector< double > *errors)
vector< double > * computeErrors (vector< double > *computed, vector< double > *expected)
void initLayerOutGradient (vector< double > *errors)
void gradientBackPropagation (vector< double > *errors)
void changeAxonsWeight (double convergenceCoeff)
double learnExample (vector< double > *exampleIn, vector< double > *exampleOut, double convergenceCoeff)
double computeAverage (vector< double > v)
list< vector< double > > * readExampleFile (QTextStream *file, QString mode)
vector< double > readTestFile (QTextStream *file)
void link2Layers (Layer *first, Layer *second)
void constructTopologyMLP ()
void constructTopologyCC ()
void clearErrorEvolution ()
void setExampleOrder (int o)
void learning (QString file, double errorThreshold, int maxNbEpoch, double convergenceCoeff)
list< vector< double > > * copyVectorList (list< vector< double > > *vl)
void description ()

Constructor & Destructor Documentation

Network::Network  ) 
 

Definition at line 13 of file network.cpp.


Member Function Documentation

void Network::addAxon int  id,
int  id_neur1,
int  id_neur2,
double  weight
 

Definition at line 410 of file network.cpp.

References Neuron::addAxonIn(), Neuron::addAxonOut(), getNeuronFromId(), and Axon::setWeight().

void Network::addAxon int  id,
int  id_neur1,
int  id_neur2
 

Definition at line 398 of file network.cpp.

References Neuron::addAxonIn(), Neuron::addAxonOut(), and getNeuronFromId().

void Network::addAxon int  id_neur1,
int  id_neur2
 

Definition at line 385 of file network.cpp.

References Neuron::addAxonIn(), Neuron::addAxonOut(), and getNeuronFromId().

Referenced by link2Layers(), Viewer::postSelection(), and NetworkParser::startElement().

void Network::addHiddenLayer int  id  ) 
 

Definition at line 236 of file network.cpp.

void Network::addHiddenLayer  ) 
 

Definition at line 229 of file network.cpp.

Referenced by addNHiddenLayers(), and NetworkParser::startElement().

void Network::addNeuron int  id_layer,
int  id,
float  x,
float  z
 

Definition at line 323 of file network.cpp.

References Layer::addNeuron(), existLayer(), and Layer::getId().

void Network::addNeuron int  id_layer  ) 
 

Neurons relative functions.

Definition at line 305 of file network.cpp.

References Layer::addNeuron(), existLayer(), and Layer::getId().

Referenced by addNNeurons(), and NetworkParser::startElement().

void Network::addNHiddenLayers int  n  ) 
 

Definition at line 242 of file network.cpp.

References addHiddenLayer().

void Network::addNNeurons int  id_layer,
int  n
 

Definition at line 341 of file network.cpp.

References addNeuron().

float Network::axonsize void   ) 
 

Definition at line 149 of file network.cpp.

void Network::changeAxonsWeight double  convergenceCoeff  ) 
 

Definition at line 566 of file network.cpp.

Referenced by learnExample().

void Network::clearErrorEvolution  ) 
 

Definition at line 663 of file network.cpp.

void Network::clearHiddenLayers  ) 
 

Definition at line 287 of file network.cpp.

References clearLayer().

Referenced by NetworkParser::startDocument().

void Network::clearLayer int  id_layer  ) 
 

Definition at line 269 of file network.cpp.

References existLayer(), Layer::getId(), and Layer::removeNeurons().

Referenced by clearHiddenLayers(), and NetworkParser::startDocument().

double Network::computeAverage vector< double >  v  ) 
 

Definition at line 582 of file network.cpp.

Referenced by learning().

double Network::computeErrorRate vector< double > *  errors  ) 
 

Definition at line 518 of file network.cpp.

Referenced by learnExample().

vector< double > * Network::computeErrors vector< double > *  computed,
vector< double > *  expected
 

Definition at line 535 of file network.cpp.

Referenced by learnExample().

vector< double > * Network::computeOut vector< double > *  in  ) 
 

Definition at line 510 of file network.cpp.

References forwardPropagation(), getOutValues(), initLayerIn(), and resetTempValues().

Referenced by learnExample().

void Network::constructTopologyCC  ) 
 

Definition at line 639 of file network.cpp.

References link2Layers(), and nbHiddenLayers().

void Network::constructTopologyMLP  ) 
 

Definition at line 624 of file network.cpp.

References link2Layers(), and nbHiddenLayers().

list< vector< double > > * Network::copyVectorList list< vector< double > > *  vl  ) 
 

Misc functions.

Definition at line 748 of file network.cpp.

Referenced by learning().

void Network::description  ) 
 

Definition at line 760 of file network.cpp.

References Layer::description().

bool Network::displayaxons void   ) 
 

Definition at line 153 of file network.cpp.

Referenced by Axon::draw().

bool Network::displaylayers void   ) 
 

Definition at line 161 of file network.cpp.

Referenced by Layer::draw().

bool Network::displayneurons void   ) 
 

Definition at line 157 of file network.cpp.

Referenced by Neuron::draw().

bool Network::displayvalues void   ) 
 

Definition at line 165 of file network.cpp.

Referenced by Neuron::draw(), and Axon::drawAxon().

void Network::draw int  selected,
const bool  names = false
 

Definition at line 206 of file network.cpp.

References Layer::draw(), and Layer::drawNeurons().

Referenced by Viewer::draw(), Viewer::drawWithNames(), and Viewer::fastDraw().

bool Network::existAxon int  id_neur_in,
int  id_neur_out
 

Definition at line 458 of file network.cpp.

bool Network::existAxon int  id_ax  ) 
 

Definition at line 451 of file network.cpp.

Referenced by Viewer::postSelection().

bool Network::existLayer int  id_layer  ) 
 

Definition at line 295 of file network.cpp.

References Layer::getId().

Referenced by addNeuron(), clearLayer(), Viewer::postSelection(), and removeHiddenLayer().

bool Network::existNeuron int  id_neur  ) 
 

Definition at line 369 of file network.cpp.

References Layer::existNeuron().

Referenced by Viewer::postSelection().

void Network::forwardPropagation  ) 
 

Definition at line 495 of file network.cpp.

References Layer::forwardPropagation().

Referenced by computeOut().

ManipulatedFrame * Network::frame int  id  ) 
 

Definition at line 189 of file network.cpp.

References Layer::frame().

Referenced by Viewer::postSelection().

list< Axon * > * Network::getAxons void   ) 
 

Definition at line 44 of file network.cpp.

double Network::getCurrentAverageError  ) 
 

Definition at line 137 of file network.cpp.

int Network::getCurrentEpoch  ) 
 

Definition at line 135 of file network.cpp.

int Network::getEPS  ) 
 

Definition at line 131 of file network.cpp.

vector< double > * Network::getErrorEvolution  ) 
 

Definition at line 139 of file network.cpp.

int Network::getHiddenLayerId int  i  ) 
 

Definition at line 60 of file network.cpp.

int Network::getHiddenLayerPos int  id  ) 
 

Definition at line 65 of file network.cpp.

list< Layer * > * Network::getHiddenLayers void   ) 
 

Definition at line 42 of file network.cpp.

Layer * Network::getInputLayer void   ) 
 

Definition at line 38 of file network.cpp.

float Network::getK  ) 
 

Definition at line 127 of file network.cpp.

Referenced by Neuron::sigmoide().

Layer * Network::getLayer int  id_l  ) 
 

Definition at line 77 of file network.cpp.

References Layer::getId().

int Network::getLayerNumFromLayerId int  id_layer  ) 
 

Definition at line 117 of file network.cpp.

References Layer::getId(), and nbHiddenLayers().

Referenced by Layer::getNum().

int Network::getLayerNumTheNeuronIsOn int  id_neur  ) 
 

Definition at line 104 of file network.cpp.

References Layer::existNeuron(), and nbHiddenLayers().

Referenced by Neuron::draw(), and Viewer::postSelection().

int Network::getNbNeurons int  id_layer  ) 
 

Definition at line 46 of file network.cpp.

References Layer::getId(), and Layer::nbNeurons().

Neuron * Network::getNeuronFromId int  id_neur  ) 
 

Definition at line 89 of file network.cpp.

References Layer::existNeuron(), and Layer::getNeuronFromId().

Referenced by addAxon().

int Network::getnextfreeid void   )  [inline]
 

Accessors.

Definition at line 49 of file network.h.

Referenced by NetworkParser::startElement().

Layer * Network::getOutputLayer void   ) 
 

Definition at line 40 of file network.cpp.

vector< double > * Network::getOutValues  ) 
 

Definition at line 502 of file network.cpp.

References Layer::getNeurons().

Referenced by computeOut().

float Network::getVStep void   ) 
 

Definition at line 185 of file network.cpp.

void Network::gradientBackPropagation vector< double > *  errors  ) 
 

Definition at line 556 of file network.cpp.

References Layer::gradientBackPropagation(), and initLayerOutGradient().

Referenced by learnExample().

void Network::initLayerIn vector< double >  in  ) 
 

Definition at line 482 of file network.cpp.

References Layer::getNeurons().

Referenced by computeOut().

void Network::initLayerOutGradient vector< double > *  errors  ) 
 

Definition at line 547 of file network.cpp.

References Layer::getNeurons().

Referenced by gradientBackPropagation().

double Network::learnExample vector< double > *  exampleIn,
vector< double > *  exampleOut,
double  convergenceCoeff
 

Definition at line 572 of file network.cpp.

References changeAxonsWeight(), computeErrorRate(), computeErrors(), computeOut(), exampleIn, and gradientBackPropagation().

Referenced by learning().

void Network::learning QString  file,
double  errorThreshold,
int  maxNbEpoch,
double  convergenceCoeff
 

Definition at line 671 of file network.cpp.

References computeAverage(), copyVectorList(), LearningThread::getState(), learnExample(), lt, PAUSE, PLAY, RANDOM_WITH, RANDOM_WITHOUT, readExampleFile(), rg, SEQUENTIAL, LearningThread::setState(), STEP, and LearningThread::uwait().

Referenced by LearningThread::run().

void Network::link2Layers Layer first,
Layer second
 

Definition at line 617 of file network.cpp.

References addAxon(), and Layer::getNeurons().

Referenced by constructTopologyCC(), and constructTopologyMLP().

int Network::nbAxons void   ) 
 

Axon relative functions.

Definition at line 381 of file network.cpp.

int Network::nbHiddenLayers  ) 
 

Layer relative functions.

Definition at line 221 of file network.cpp.

Referenced by constructTopologyCC(), constructTopologyMLP(), getLayerNumFromLayerId(), and getLayerNumTheNeuronIsOn().

int Network::nbLayers  ) 
 

Definition at line 225 of file network.cpp.

int Network::nbNeurons void   ) 
 

Definition at line 359 of file network.cpp.

References Layer::nbNeurons().

float Network::neuronsize void   ) 
 

Definition at line 145 of file network.cpp.

Referenced by Neuron::draw(), Axon::drawAxon(), Layer::setNeuronsLinePos(), and Layer::updateNeuronsPos().

list< vector< double > > * Network::readExampleFile QTextStream *  file,
QString  mode
 

Definition at line 591 of file network.cpp.

References Layer::nbNeurons().

Referenced by learning().

vector< double > Network::readTestFile QTextStream *  file  ) 
 

Definition at line 608 of file network.cpp.

References Layer::nbNeurons().

void Network::removeAxon int  id_ax,
bool  b
 

Definition at line 424 of file network.cpp.

Referenced by Neuron::removeAxons().

void Network::removeAxons  ) 
 

Definition at line 441 of file network.cpp.

Referenced by NetworkParser::startDocument().

void Network::removeHiddenLayer int  id_layer  ) 
 

Definition at line 247 of file network.cpp.

References existLayer().

void Network::removeNeuron int  id_neur  ) 
 

Definition at line 346 of file network.cpp.

References Layer::existNeuron(), and Layer::removeNeuron().

void Network::resetAllValues  ) 
 

Learning relative functions.

Definition at line 466 of file network.cpp.

References Layer::resetAllValues().

void Network::resetTempValues  ) 
 

Definition at line 474 of file network.cpp.

References Layer::resetTempValues().

Referenced by computeOut().

void Network::setDisplayAxons bool  display  ) 
 

Definition at line 169 of file network.cpp.

void Network::setDisplayLayers bool  display  ) 
 

Definition at line 177 of file network.cpp.

void Network::setDisplayNeurons bool  display  ) 
 

Definition at line 173 of file network.cpp.

void Network::setDisplayValues bool  display  ) 
 

Definition at line 181 of file network.cpp.

void Network::setEPS int  e  ) 
 

Definition at line 133 of file network.cpp.

void Network::setExampleOrder int  o  ) 
 

Definition at line 667 of file network.cpp.

void Network::setK float  _k  ) 
 

Definition at line 129 of file network.cpp.

Referenced by NetworkParser::startElement().

void Network::setnextfreeid int  id  )  [inline]
 

Definition at line 50 of file network.h.

Referenced by NetworkParser::startElement().

void Network::setShininess int  shiny  ) 
 

Definition at line 202 of file network.cpp.

Referenced by Viewer::draw(), Viewer::drawWithNames(), and Viewer::fastDraw().

int Network::shininess void   ) 
 

Graphism relative functions.

Definition at line 141 of file network.cpp.

Referenced by Neuron::draw(), and Layer::drawLayer().


The documentation for this class was generated from the following files:
Generated on Fri Dec 3 14:57:56 2004 for INN by doxygen 1.3.6