Empirical

vecxt_re.Empirical
See theEmpirical companion class
object Empirical

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Empirical.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

inline def equalWeights(values: Array[Double]): Empirical

Construct an unweighted empirical distribution (all weights equal to $1$).

Construct an unweighted empirical distribution (all weights equal to $1$).

Note: We intentionally avoid apply overloads here because IArray[Double] erases to Array[Double] on the JVM, which can create signature collisions with the case class companion methods.

Attributes

inline def weighted(values: Array[Double], weights: Array[Double]): Empirical

Construct a weighted empirical distribution from arrays.

Construct a weighted empirical distribution from arrays.

Attributes

Givens

Givens

given empiricalDecoder: Decoder[Empirical]
given empiricalEncoder: Encoder[Empirical]

JSON codec. Only the defining parameters (values, weights) are written; derived state (sorted support, CDF table, RNG) is rebuilt on decode. Constructor validation failures surface as a io.circe.DecodingFailure.

JSON codec. Only the defining parameters (values, weights) are written; derived state (sorted support, CDF table, RNG) is rebuilt on decode. Constructor validation failures surface as a io.circe.DecodingFailure.

Attributes