Indexes of the input array are treated as values of stochastic function, but array values are treated as "probabilities" (total amount of hits).
public Histogram( int[] values ) { this.values = values; Update( ); }