Automatic simplification framework. Sources in simplification.cpp and alternateForms.cpp. More...
#include "abstract.h"

Go to the source code of this file.
Namespaces | |
| csl | |
| Namespace for csl library. | |
Functions | |
| void | csl::printVector (const csl::vector_expr &vector) |
| Display a vector of expressions. Useful in debug. More... | |
| void | csl::addAlternateForm (csl::vector_expr &alternateForms, const Expr &newAlternate, bool add_factor_expand=true) |
| Tried to add newAlternate in the set alternateForms. We simply test if the alternate is already present in the set newAlternate and add it if it is not the case. If add_factor_expand is set to true, we try to add the expanded and the factored forms of newAlternate. More... | |
| void | csl::reduceAlternate (csl::vector_expr &alternateForms) |
| Reduces the number of elements in alternateForms to MAX_ALTERNATE_FORMS. More... | |
| void | csl::clearRedundancyAlternate (csl::vector_expr &alternateForms) |
| Search and remove redundancies (equal alternate forms) in alternateForms. More... | |
| csl::vector_expr | csl::getRecursiveAlternateForms (const Expr &expr, int depth=-1) |
| Returns the alternate forms of expr by applying recursively internalRecursiveAlternateForms() MAX_RECURSION_ALTERNATE times: take alternates, then alternates of the alternates etc. More... | |
| csl::vector_expr | csl::internalRecursiveAlternateForms (const Expr &expr, int depth=-1) |
| Calculates and return all alternate forms of expr, by getting (once) alternate forms of the possible arguments of expr, and then the specific alternates of expr. More... | |
| Expr | csl::Simplify (const Expr &expr, int depth=-1) |
| Simplifies expr depending on its type. More... | |
| int | csl::numberOfMutatingNodes (const Expr &expr) |
| bool | csl::insertSortMutant (csl::vector_expr &vec, const Expr &newExpr) |
| bool | csl::addMutants (csl::vector_expr &individuals, const csl::vector_expr &mutants) |
| csl::vector_expr | csl::getRandomMutation (const Expr &expr) |
| void | csl::naturalSelection (csl::vector_expr &individuals) |
| Expr | csl::evolve (const Expr &baseIndividual) |
Variables | |
| bool | csl::RANDOM_SEED = false |
| const int | csl::NUMBER_OF_MUTATIONS = 7 |
| const int | csl::NATURAL_SELECTION = 3 |
| const int | csl::NUMBER_OF_GENERATION = 11 |
| const int | csl::GENERATION_BEFORE_SELECTION = 5 |
| const int | csl::SIMPLIFICATION_METHOD = 1 |
| Determines which simplification method is applied. Ther used to be 2, now there is only one method. It may be useful in the future. | |
| const int | csl::MAX_ALTERNATE_FORMS = 10 |
| Maximum number of alternate forms given by getRecursiveAlternateForms(). When getting alternate forms of an expression, we keep only the MAX_ALTERNATE_FORMS simpler. | |
| const int | csl::MAX_RECURSION_ALTERNATE = 7 |
| When getting alternateForms, we iterate MAX_RECURSION_ALTERNATE times (getting alternate forms of the alternate forms) in order to allow alternates that need several steps of Transformation. | |
Automatic simplification framework. Sources in simplification.cpp and alternateForms.cpp.
1.8.13