ecl_math Documentation

ecl_math

This package provides simple support to cmath, filling in holes or redefining in a c++ formulation where desirable.

packageSummary

This group includes various mathematical macros, constants and utility functions/functors.

CompilingLinking

Include the following at the top of any translation unit which requires this library:

        #include <ecl/math.hpp>

        // constants
        using ecl::pi; // also pi_2, pi_4
        
        // simple functions
        using ecl::EuclideanNorm;
        using ecl::isApprox;
        using ecl::isApproxOrLessThan;
        using ecl::sign; // also psign 
        using ecl::cube_root; // only for real numbers/solutions

Since it is a collection of macros and headers only, no linking is required if you are only utilising this functionality.

usage

Macros for PI

Usually there will always be macros for pi defined in math.h, namely M_PI, M_PI_2, etc... (sometimes they're unavailable, e.g. windoze!). For typesafe definitions, the ecl defines a couple of these similarly in the ecl::math namespace.

Simple Functions

Various regularly used functions are also present - usually in the form of functors (useful for passing around should it ever be necessary).

unitTests

ChangeLog



ecl_math
Author(s): Daniel Stonier
autogenerated on Wed Aug 26 2015 11:27:45