Replaced a few int with size_t to fix 64 bit warnings.
This commit is contained in:
parent
99ef63e019
commit
b899c6f55e
4 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@ void Layer::feedForward(const Layer &inputLayer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double Layer::getWeightedSum(int outputNeuron) const
|
double Layer::getWeightedSum(size_t outputNeuron) const
|
||||||
{
|
{
|
||||||
double sum = 0.0;
|
double sum = 0.0;
|
||||||
|
|
||||||
|
|
2
Layer.h
2
Layer.h
|
@ -14,7 +14,7 @@ public:
|
||||||
|
|
||||||
void setOutputValues(const std::vector<double> & outputValues);
|
void setOutputValues(const std::vector<double> & outputValues);
|
||||||
void feedForward(const Layer &inputLayer);
|
void feedForward(const Layer &inputLayer);
|
||||||
double getWeightedSum(int outputNeuron) const;
|
double getWeightedSum(size_t outputNeuron) const;
|
||||||
void connectTo(const Layer & nextLayer);
|
void connectTo(const Layer & nextLayer);
|
||||||
|
|
||||||
void updateInputWeights(Layer &prevLayer);
|
void updateInputWeights(Layer &prevLayer);
|
||||||
|
|
|
@ -30,7 +30,7 @@ void Neuron::feedForward(double inputValue)
|
||||||
outputValue = transferFunction(inputValue);
|
outputValue = transferFunction(inputValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
double Neuron::getWeightedOutputValue(unsigned int outputNeuron) const
|
double Neuron::getWeightedOutputValue(size_t outputNeuron) const
|
||||||
{
|
{
|
||||||
if (outputNeuron < outputWeights.size())
|
if (outputNeuron < outputWeights.size())
|
||||||
{
|
{
|
||||||
|
|
2
Neuron.h
2
Neuron.h
|
@ -17,7 +17,7 @@ public:
|
||||||
|
|
||||||
void setOutputValue(double value);
|
void setOutputValue(double value);
|
||||||
void feedForward(double inputValue);
|
void feedForward(double inputValue);
|
||||||
double getWeightedOutputValue(unsigned int outputNeuron) const;
|
double getWeightedOutputValue(size_t outputNeuron) const;
|
||||||
|
|
||||||
void createRandomOutputWeights(size_t numberOfWeights);
|
void createRandomOutputWeights(size_t numberOfWeights);
|
||||||
void createOutputWeights(std::list<double> weights);
|
void createOutputWeights(std::list<double> weights);
|
||||||
|
|
Loading…
Reference in a new issue