Distribution

trait Distribution[T] extends Serializable {

  /**
   * Gets one sample from the distribution.
   */
  def draw: T

  /**
   * @return The unnormalized value of the measure.
   */
  def apply: T => Double

  /**
   * The draw with highest probability.
   */
  def best: T

}

Constant and CategoricalDistribution are the two main implementation of Distribution, they are respectively associated with HardClustering and CategoricalClustering