org.apache.ignite.ml.dataset.feature

## Interface Histogram<T,H extends Histogram<T,H>>

- Type Parameters:
    `T` - Type of object for histogram.
    `H` - Type of histogram that can be used in math operations with this histogram.
  All Superinterfaces:
    Serializable
  All Known Subinterfaces:
    ImpurityComputer<T,H>
  All Known Implementing Classes:
    BootstrappedVectorsHistogram, CountersHistogram, GiniHistogram, MSEHistogram, ObjectHistogram

      public interface Histogram<T,H extends Histogram<T,H>>
      extends Serializable

  Interface of histogram over type T.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addElement(T val)` Add object to histogram.
    `Set<Integer>` | `buckets()`
    `Optional<Double>` | `getValue(Integer bucketId)`
    `boolean` | `isEqualTo(H other)` Compares histogram with other and returns true if they are equals
    `H` | `plus(H other)`

- - ### Method Detail

    - #### addElement

          void addElement(T val)

      Add object to histogram.
      Parameters:
        `val` - Value.

    - #### buckets

          Set<Integer> buckets()

      Returns:
        Bucket ids.

    - #### getValue

          Optional<Double> getValue(Integer bucketId)

      Parameters:
        `bucketId` - Bucket id.
      Returns:
        Value in according to bucket id.

    - #### plus

          H plus(H other)

      Parameters:
        `other` - Other histogram.
      Returns:
        Sum of this and other histogram.

    - #### isEqualTo

          boolean isEqualTo(H other)

      Compares histogram with other and returns true if they are equals
      Parameters:
        `other` - Other histogram.
      Returns:
        True if histograms are equal.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020