AI-PSO
view release on metacpan or search on metacpan
# http://module-build.sourceforge.net/META-spec.html
name: AI-PSO
version: 0.86
version_from: lib/AI/PSO.pm
installdirs: site
requires:
Callback: 0
Math::Random: 0
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.30
PSO version 0.81
================
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
This module requires these other modules and libraries:
examples/NeuralNet/NeuralNet.h view on Meta::CPAN
/// \class Neuron NeuralNet.h NeuralNet
/// \brief exported class which simulates a neruon within a Neural Net
///
class NEURALNET_API Neuron
{
public:
///
/// \fn Neuron()
/// \brief constructor
/// \note, add flag in constructor to choose what type of TransferFunction to use
///
Neuron()
{
m_capacity = 1;
m_numConnections = 0;
m_neurons = new Neuron*[m_capacity];
m_weights = new double[m_capacity];
m_value = 0;
xfer = new UnityGain();
}
examples/NeuralNet/NeuralNet.h view on Meta::CPAN
delete [] m_neurons;
delete [] m_weights;
delete xfer;
}
///
/// \fn virtual double value()
/// \brief calculates the value of the neuron. It is virtual
/// because the value is calculated differently for
/// different types of Neurons.
///
virtual double value()
{
for(int i = 0; i < m_numConnections; i++)
m_value += m_neurons[i]->value() * m_weights[i];
return m_value = xfer->compute(m_value);
}
///
examples/NeuralNet/NeuralNet.h view on Meta::CPAN
m_output.addConnection(&m_hidden[k]);
}
int m_numInputs; /// number of input Neurons in network
int m_numHidden; /// number of hidden Neurons in network
Input *m_inputs; /// array of Input Neurons
// Neuron *m_hidden; /// array of hidden Neurons
Hidden *m_hidden; /// array of hidden Neurons
Neuron m_output; /// the single output Neuron (it is more efficient to have a separate network for each output)
string m_xferFunc; /// type of transfer function for hidden neurons
};
#endif
( run in 1.045 second using v1.01-cache-2.11-cpan-df04353d9ac )