|
using System;
using ArchiveSerialization;
namespace NeuralNetworkLibrary
{
// Neuron class
public class NNNeuron : IArchiveSerialization
{
public string label;
public double output;
public NNConnectionList m_Connections;
public NNNeuron()
{
Initialize();
label = "";
output = 0.0;
m_Connections = new NNConnectionList();
}
public NNNeuron(string str)
{
label = str;
output = 0.0;
m_Connections = new NNConnectionList();
Initialize();
}
public NNNeuron(string str,int icount)
{
label = str;
output = 0.0;
m_Connections = new NNConnectionList(icount);
Initialize();
}
public void AddConnection(uint iNeuron, uint iWeight)
{
NNConnection conn = new NNConnection(iNeuron, iWeight);
m_Connections.Add(conn);
}
public void AddConnection(NNConnection conn)
{
m_Connections.Add(conn);
}
private void Initialize()
{
}
public virtual void Serialize(Archive ar)
{
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.