[mlpack-git] [mlpack/mlpack] NeuralEvolution - implemented gene, genome (#686)
Marcus Edel
notifications at github.com
Tue Jun 14 09:14:24 EDT 2016
> + if (aNeuronGenes[i].Id() == id) {
> + return aNeuronGenes[i];
> + }
> + }
> + }
> +
> + // Get neuron index by id.
> + size_t GetNeuronIndex(size_t id) const {
> + for(size_t i=0; i < NumNeuron(); ++i) {
> + if (aNeuronGenes[i].Id() == id) {
> + return i;
> + }
> + }
> +
> + return -1;
> + }
If we use size_t as return type, we can't use -1, maybe we can start with 1 and return 0?
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/686/files/ee548b6e8b43ae5ef30eda8d5ed8b85d5908d0a0#r66966608
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160614/18be86c8/attachment.html>
More information about the mlpack-git
mailing list