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

Excalibur notifications at github.com
Wed Jun 8 20:48:12 EDT 2016


> +
> +  // Destructor.
> +  ~LinkGene() {}
> +
> +  // Get aFromNeuronId.
> +  unsigned int FromNeuronId() const { return aFromNeuronId; }
> +
> +  // Get aToNeuronId.
> +  unsigned int ToNeuronId() const { return aToNeuronId; }
> +
> +  // Get aInnovationId.
> +  unsigned int InnovationId() const { return aInnovationId; }
> +
> +  // Set aWeight.
> +  void Weight(double weight) { aWeight = weight; }
> +

@zoq So in this way, linkGene.Weight() get the weight, and linkGene.Weight() = weight set the member weight, is this correct?

I can change them into this style. But just a little bit  curious, what is the main benefit of this format? (compared with Weight() getter and Weight(weight) setter)


---
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/3c8aa62b951f029b3883e9baef1ea556ef5af2d3#r66366961
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160608/58e9ee84/attachment-0001.html>


More information about the mlpack-git mailing list