# GSA Search Algorithm in C++

Is there any version of GSA (Gravitational Search Algorithm)[1] implemented with C++ or even C#?

What I found was implemented using MATLAB which is not good for me.

[1] Rashedi, Esmat, Hossein Nezamabadi-Pour, and Saeid Saryazdi. "GSA: a gravitational search algorithm." Information sciences 179.13 (2009): 2232-2248.

• In theory you can use the GSA code in matlab, and rewrite it in C++/C#. Is that possible for you? – arc_lupus May 30 '16 at 21:35
• What is GSA? Other users might not know the algorithm. I think that this question is off-topic here since it asks for an implementation of a particular algorithm and not about the algorithm itself. – nicoguaro Jun 9 '16 at 16:10
• You can find a C version here: github.com/edgnik/gsa-cpu-gpu – nicoguaro Jun 9 '16 at 16:11
• I'm voting to close this question as off-topic because it asks about a particular implementation of an algorithm. – nicoguaro Jun 9 '16 at 16:11
• @nicoguaro I disagree -- it's a perfectly reasonable (if poorly formulated) question, which your comment seems to answer (please consider expanding on it in an answer). At most, it could be closed as "unclear what you're asking", since it's not explained why Matlab is not good. – Christian Clason Jun 9 '16 at 22:25

For an inverse square law, the denominator should be $R^3$, not $R$, in equation (7).