Description

(Multi)dimensional integration using the MISER algorithm.

Package Information

Version0.2.1 (2015-Sep-11)
Repositoryhttps://github.com/BlackEdder/mintegrated
LicenseApache v2.0
CopyrightCopyright © 2015, Edwin van Leeuwen
AuthorsEdwin van Leeuwen
Registered byEdwin van Leeuwen
Dependencies

scid

dstats

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

Mintegrated Build Status

Library for (multi)dimensional integration written in D. Currently limited to an implementation of the MISER algorithm

unittest
{
    import std.math : PI, pow;
    import std.stdio : writeln;
    auto func = function( double[] xs )
    {
        if (pow(xs[0],2)+pow(xs[1],2)<= 1.0)
            return 1.0;
        return 0.0;
    };

    auto result = integrate( func, [-1.0,-1], [1.0,1.0], 1e-5, 1e-7 );
    result.writeln;
    assert( result.value <= PI + 1e-3 );
    assert( result.value >= PI - 1e-3 );
}

Available versions

0.2.1 0.2.0 0.1.2 0.1.1 0.1.0 0.0.3 0.0.2 0.0.1 ~master