#Code review

11 messages · Page 1 of 1 (latest)

jagged elbow
#

i wrote this simple GA simulator (missing the crucial fitness func)
i am new to cpp and would like to get feed back if it has any important errors before diving head first into the fitness func
also tipps on how to implement or what modules to use for my fitness func are welcome
i wish to approximate 2d shapes with simple rectangles and circles

mellow mantleBOT
#

When your question is answered use !solved or the button below to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

jagged elbow
#

it compiles but i have no idea if it has any other errors

#

i started testing it and added a few things i missed but i dont see anything else than the fitness left

opal mason
#

Better suited for #1078717238678409369

#

Not quite sure what the purpose of the program is but for starters, you should take parameters of large objects by reference to avoid unecessary copies

#

Especially types like vectors that can be very expensive to copy

#

If the parameter is only read from in the body, define the parameter as const type&, it's free performance without it breaking existing calls

noble roost
#
constexpr double PI = 3.14; //type safe :)
jagged elbow