[mlpack-git] [mlpack/mlpack] NeuralEvolution - implemented gene, genome (#686)

Marcus Edel notifications at github.com
Sat Jul 2 19:02:24 EDT 2016


> +    return -1;  // -1 means no match found, a new innovation.
> +  }
> +
> +  // Check whether a neuron innovation already exist.
> +  ssize_t CheckNeuronInnovation(ssize_t splitLinkInnovId) {
> +    for (ssize_t i=0; i<aNeuronInnovations.size(); ++i) {
> +      if (aNeuronInnovations[i].splitLinkInnovId == splitLinkInnovId) {
> +        return i;
> +      }
> +    }
> +
> +    return -1;
> +  }
> +
> +  // Add a new link innovation.
> +  LinkInnovation AddLinkInnovation(ssize_t fromNeuronId, ssize_t toNeuronId) {

I think it's a good idea to use a reference here:

``
 AddLinkInnovation(ssize_t fromNeuronId, ssize_t toNeuronId, LinkInnovation& linkInnov)
``

---
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/554a279b0089e4385dfb40077e578d6ae2a42ece#r69383593
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160702/e89b08ae/attachment.html>


More information about the mlpack-git mailing list