gintool / gin

GI in No Time - a Simple Microframework for Genetic Improvement
MIT License
43 stars 20 forks source link

Added Edits for Unary Operators #22

Closed sandybrownlee closed 6 years ago

sandybrownlee commented 6 years ago

Added a new subclass of ModifyNode: UnaryOperatorReplacement. This will allow edits that replace one unary operator with another, within these two groups:

logical complement (~); bitwise complement (!); minus (- indicates negative number); plus (+ positive number)

postfix increment (++); postfix decrement (--); prefix increment (++); prefix decrement (--);

Also, edits for modifying nodes won't be added unless there are some nodes they can be applied to.