The OpenD Programming Language

Summator

Output range for summation.

struct Summator (
T
Summation summation
) if (
isMutable!T
) {
@attr
static if(!(summation == Summation.precise))
static if(summation == Summation.kb2)
F s;
@attr
static if(!(summation == Summation.precise))
static if(summation == Summation.kb2)
F cs;
@attr
static if(!(summation == Summation.precise))
static if(summation == Summation.kb2)
F ccs;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(summation == Summation.kbn)
F s;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(summation == Summation.kbn)
F c;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(summation == Summation.kahan)
F s;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(summation == Summation.kahan)
F c;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(summation == Summation.kahan)
F y;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(summation == Summation.kahan)
F t;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(summation == Summation.pairwise)
size_t index;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(summation == Summation.pairwise)
static if(fastPairwise)
enum registersCount;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(summation == Summation.pairwise)
static if(fastPairwise)
F[size_t.sizeof * 8] partials;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(summation == Summation.pairwise)
static if(!(fastPairwise))
F[size_t.sizeof * 8] partials;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(!(summation == Summation.pairwise))
static if(summation == Summation.naive)
F s;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(!(summation == Summation.pairwise))
static if(!(summation == Summation.naive))
static if(summation == Summation.fast)
F s;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(!(summation == Summation.pairwise))
static if(!(summation == Summation.naive))
static if(!(summation == Summation.fast))
static if(summation == Summation.decimal)
Decimal!128 s;
@attr
static if(!(summation == Summation.precise))
static if(!(summation == Summation.kb2))
static if(!(summation == Summation.kbn))
static if(!(summation == Summation.kahan))
static if(!(summation == Summation.pairwise))
static if(!(summation == Summation.naive))
static if(!(summation == Summation.fast))
static if(summation == Summation.decimal)
T ss;
}

Constructors

this
this(T n)

Public Imports

mir.ndslice.slice
public import mir.ndslice.slice;
Undocumented in source.

Members

Functions

isFinite
bool isFinite()

Returns true if current sum is finite (not infinite or NaN).

isFinite
bool isFinite()

Returns true if current sum is finite (not infinite or NaN).

isInfinity
bool isInfinity()

Returns true if current sum is ±∞.

isInfinity
bool isInfinity()

Returns true if current sum is ±∞.

isNaN
bool isNaN()

Returns true if current sum is a NaN.

isNaN
bool isNaN()

Returns true if current sum is a NaN.

opAssign
void opAssign(T rhs)

Operator overloading.

opCast
C opCast()

Returns Summator with extended internal partial sums.

opCast
C opCast()

cast(C) operator overloading. Returns cast(C)sum(). See also: cast

opOpAssign
void opOpAssign(T rhs)
void opOpAssign(Summator rhs)

Operator overloading.

put
void put(N n)
void put(Range r)

Adds n to the internal partial sums.

sum
T sum()

Returns the value of the sum.

Meta