isProbabilityVector(
values):values is ArrayLike<Probability>
Defined in: packages/distribution/src/probability-vector.ts:16
Whether every entry is a probability and the compensated total lies within PROBABILITY_TABLE_SUM_TOLERANCE of one.
This is the rule probabilityTableDistribution applies to its masses, without building a distribution. A caller
that rejects a vector throws its own error. Takes linear time and constant space.
Parameters
Section titled “Parameters”values
Section titled “values”ArrayLike<number>
Returns
Section titled “Returns”values is ArrayLike<Probability>