Flow PHP

Cardinality

Read onlyYes
FinalYes

Constants

DEFAULT_RELATIVE_ERROR  : float = 0.5

Properties

$atMost  : null|int<0, max>
$estimate  : null|int<0, max>
$relativeError  : float

Methods

__construct()  : mixed
approximately()  : self
atMost()  : self
confident()  : null|int<0, max>
The estimate when it is known to at least $maxRelativeError, null when it is not.
exact()  : self
exactly()  : null|int<0, max>
The count when it is guaranteed and known exactly, null otherwise.
isUnknown()  : bool
merge()  : self
normalize()  : array{at_most: null|int<0, max>, estimate: null|int<0, max>, relative_error: null|float}
relative_error is null when it is not a finite number.
unknown()  : self

Constants

DEFAULT_RELATIVE_ERROR

public float DEFAULT_RELATIVE_ERROR = 0.5

Properties

Methods

__construct()

public __construct([null|int $atMost = null ][, null|int $estimate = null ][, float $relativeError = self::DEFAULT_RELATIVE_ERROR ]) : mixed
Parameters
$atMost : null|int = null

a GUARANTEED upper bound; null when nothing is guaranteed

$estimate : null|int = null

a best guess that may be wrong in either direction

$relativeError : float = self::DEFAULT_RELATIVE_ERROR

rough 1-sigma relative error of $estimate; meaningless without one

approximately()

public static approximately(int $rows[, float $relativeError = self::DEFAULT_RELATIVE_ERROR ]) : self
Parameters
$rows : int
$relativeError : float = self::DEFAULT_RELATIVE_ERROR
Return values
self

atMost()

public static atMost(int $rows) : self
Parameters
$rows : int
Return values
self

confident()

The estimate when it is known to at least $maxRelativeError, null when it is not.

public confident(float $maxRelativeError) : null|int<0, max>

A caller that needs a guarantee reads $atMost instead.

Parameters
$maxRelativeError : float
Return values
null|int<0, max>

exact()

public static exact(int $rows) : self
Parameters
$rows : int
Return values
self

exactly()

The count when it is guaranteed and known exactly, null otherwise.

public exactly() : null|int<0, max>
Return values
null|int<0, max>

isUnknown()

public isUnknown() : bool
Return values
bool

merge()

public merge(self $other) : self
Parameters
$other : self
Return values
self

normalize()

relative_error is null when it is not a finite number.

public normalize() : array{at_most: null|int<0, max>, estimate: null|int<0, max>, relative_error: null|float}
Return values
array{at_most: null|int<0, max>, estimate: null|int<0, max>, relative_error: null|float}

unknown()

public static unknown() : self
Return values
self
On this page

Search results