• J.Greitemann's avatar
    Added a composition functor · 27c850b4
    J.Greitemann authored
    This allows to compose functions. The operator% is 'hijacked' as the composition
    operator, i.e.
    
    (f % g)(x) = f(g(x)) .
    
    The reason to choose % is its precedence which is higher than +, -, and equal
    to *, /. Thus,
    
    (f + g % h)(x) = f(x) + g(h(x)) ,
    
    but
    
    (f * g % h)(x) = (f * g)(h(x)) = f(h(x)) * g(h(x)) .
    
    The latter may not be considered desirable. However, there's no overloadable
    binary operator in the language with a precedence higher than *, /, and %.
    27c850b4
Name
Last commit
Last update
.gitignore Loading commit data...
Makefile Loading commit data...
analysis.hpp Loading commit data...
composition.hpp Loading commit data...
functions.hpp Loading commit data...
integration.hpp Loading commit data...
main.cpp Loading commit data...
polynomial.hpp Loading commit data...
primitives.hpp Loading commit data...
product.hpp Loading commit data...
sum.hpp Loading commit data...