Documentation

Counters
in package

A set of methods that take a ValueStream and perform different types of totalizations.

All methods should have the same signature, ValuesStream and an array of configuration options.

Table of Contents

Methods

totalize()  : ValueStream
Totalizes the value stream respecting resets and jumps in the data
totalPoints()  : ValueStream
Returns a valuestream that is the total number of points in the stream

Methods

totalize()

Totalizes the value stream respecting resets and jumps in the data

public static totalize(ValueStream $vs[, array<string|int, mixed> $config = [] ]) : ValueStream

Config options are: reset_ceiling This allows a user to set the ceiling of the counter. This means when a reset happen, it is assumed that the counter hit the ceiling and reset

Parameters
$vs : ValueStream
$config : array<string|int, mixed> = []
Tags
throws
Exception
Return values
ValueStream

totalPoints()

Returns a valuestream that is the total number of points in the stream

public static totalPoints(ValueStream $vs[, array<string|int, mixed> $config = [] ]) : ValueStream

Config options are: initial_point, default 1. This allows a user to set the first point

Parameters
$vs : ValueStream
$config : array<string|int, mixed> = []
Tags
throws
Exception
Return values
ValueStream

        
On this page

Search results