Magi

Contact info
Studies
  Scientific publications
  Master's thesis
Work
Software
Hobbies
Other Articles
  Evolution
  Metsola
  Pseudoart
Photography
Historical

© Marko Grönroos, 1998


class FreeNetwork

A generic and extensible neural network. More...

Definition#include <termination.h>
InheritsANNetwork, Attributed (common)
Inherited byRegulationNet
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

Public Members

Protected Members

Detailed Description

A generic and extensible neural network.

FreeNetwork (const char* description=NULL)

Constructs the neural network with the given topology description string. See FreeNetwork::makeUnits() for more information about the format of the description string.

void makeUnits (const char* topology)

Builds a non-connected network according to the given layer topology (for example: "7-4-2" or "8").

See ANNLayering for some more information about the description strings.

void make (const char* top)
[virtual]

Implementation for ANNetwork.

See also: makeUnits

void copy (const FreeNetwork& fnet, bool onlyWeights=false)
[virtual]

Implementation for ANNetwork.

void empty ()

Destroys all units.

void removeUnit (int i)

Removes the i:th unit and all connections from it and to it.

void connectFfw (const PackTable<int>& conns)

Builds the network from connection matrix, restricting the topology to only feedforward connections.

void connectFullFfw ()

Connects all units in subsequent layers to form feedforward topology.

void connectFull ()

Connects all units to all units, including self.

void setUnitTemplate (FreeNeuron* t)

Sets the unit template. The object t must be an instance of an inheritor of FreeNeuron.

NOTE: The template is destructed along with the FreeNetwork, so do not destroy it yourself.

void copyFreeNet (const FreeNetwork& orig, bool onlyWeights=false)
[virtual]

Implementation for ANNetwork. Copies the other FreeNet unto self.

void init (double r=0.0)
[virtual]

Implementation for ANNetwork. Initializes the weights and biases randomly according to the range, or if an initializer has been given, using that.

void reset ()

Resets activations to 0.0.

void update ()
[virtual]

Transfers signals once for all units.

const FreeNeuron& operator[] (int i)
[const]

Returns i:th unit. Const version.

FreeNeuron& operator[] (int i)

Returns i:th unit. Non-const version.

int size ()
[const]

Returns the number of neurons in the network.

const ANNLayering& getLayering ()
[const]

Returns current layering.

void setInitializer (NeuronInitializer* initer)

Sets the given initializer.

NOTE: Takes the ownership of the initializer and destroys it along with the FreeNetwork.

FreeConnection* connect (int i, int j)

Creates a connection from neuron i to neuron j.

>>
void operator>> (OStream& out)
[const virtual]

Implementation for Object. Prints out a formatted printout of the network.

String drawEPS (double xsize=-1, double ysize=-1)
[const]

Draws a picture of the network in EPS (Encapsulated PostScript). If no size is given, the image is drawn using default scaling.

Returns: Picture as EPS code.

void cleanup (bool removeDisableds=false, bool removePassthroughs=false)

Removes unnecessary connections and disables lonely units.

Parameters:
removeDisabledsShould disabled units be purged? Default: false (not purged).
removePassthroughsRemove units that have only one input and one output connection. Default: false (not purged).

void drawFeedForward ()

Order the coordinates of the FreeNeuron neurons (which do have coordinates) in the network in a pretty way in two-dimensional space.

void check ()
[const]

Implementation for Object.

ANNLayering mLayering
[protected]

Layering information.

Array<FreeNeuron> mUnits
[protected]

The neurons.

FreeNeuron* mUnitTemplate
[protected]

Neuron template.

NeuronInitializer* mInitializer
[protected]

Neuron initializer method.

Generated by: magi@magi.yok.utu.fi on Wed Sep 29 17:27:22 199.