multivar_horner
multivar_horner copied to clipboard
optimise factor evaluation
optimise factor evaluation in order to save instructions ('factor factorisation'): a monomial factor consists of scalar factors and in turn some monomial factors consist of other monomial factors -> the result of evaluating a factor can be reused for evaluating other factors containing it -> find the optimal 'factorisation' of the factors themselves -> set the factorisation_idxs of each factor in order to link the evaluation appropriately
idea: choose 'Goedel IDs' as the monomial factor ids then the id of a monomial is the product of the ids of its scalar factors find the highest possible divisor among all factor ids (corresponds to the 'largest' factor included in the monomial) this leads to a minimal factorisation ('factorisation tree') for evaluating the monomial values quickly