mboumaraf / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

IActivationFunction implementing ICloneable #314

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I suppose it would be useful for the activation functions to implement 
ICloneable. This would be useful, for example, to create networks based on a 
predefined template.

I have added ICloneable support directly on the IActivationFunction. However, 
if you don't want to change the interface, the : ICloneable could also be added 
individually on each class.

Original issue reported on code.google.com by cesarso...@gmail.com on 4 Aug 2012 at 1:18

Attachments:

GoogleCodeExporter commented 8 years ago
My personal preference would be to put ICloneable into each class which wants 
to implement it, so the IActivationFunction does not force anything extra but 
just its own implementation. Since we don't extend the ICloneable interface, 
not sure interface inheritance is appropriate.

Original comment by andrew.k...@gmail.com on 4 Aug 2012 at 4:51

GoogleCodeExporter commented 8 years ago
No problem, here it goes. 

The patch was created in the Sources\Neuro folder.

Original comment by cesarso...@gmail.com on 4 Aug 2012 at 5:25

Attachments:

GoogleCodeExporter commented 8 years ago
Added implementation of ICloneable interface to activation functions.

Committed in revision 1698.

Original comment by andrew.k...@gmail.com on 8 Aug 2012 at 12:51

GoogleCodeExporter commented 8 years ago
There is a need where you wan to clone an object for your custom requirement 
you need to "ICloneable" Interface and Implement Clone() Method, the inbuilt 
Clone() method does not fulfill custom requirement.
Visit this link for view C#.Net Example , VB.Net Examples with Sample 
downloadable application.

http://jayeshsorathia.blogspot.com/2012/10/net-tips-c-tips-implement-icloneable-
interface.html

Original comment by jayeshso...@gmail.com on 22 Oct 2012 at 2:38

GoogleCodeExporter commented 8 years ago
So what are you complaining about? Have a look at the code and see that all 
functions implement ICloneable interface. There is no some sort of custom 
inbuilt Clone() method.

Original comment by andrew.k...@gmail.com on 22 Oct 2012 at 2:43

GoogleCodeExporter commented 8 years ago

Original comment by andrew.k...@gmail.com on 16 Jul 2013 at 9:53