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

Marcus Edel notifications at github.com
Sat Jul 2 18:33:02 EDT 2016


> +    struct DepthAndLink
> +    {
> +      double depth;
> +      LinkGene link;
> + 
> +      DepthAndLink(double d, LinkGene& l) : depth(d), link(l) {}
> +
> +      bool operator < (const DepthAndLink& dL) const
> +      {
> +        return (depth < dL.depth);
> +      }
> +    };
> +
> +    std::vector<double> toNeuronDepths;
> +    for (ssize_t i=0; i<aLinkGenes.size(); ++i) {
> +      NeuronGene toNeuron = GetNeuronById(aLinkGenes[i].ToNeuronId());

Maybe it's a good idea, to add a GetDepthById function, in this case we could avoid to copy the object.

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


More information about the mlpack-git mailing list