import java.util.ArrayList;


public class Histogram {
	protected ArrayList<Double> histogram = new ArrayList<Double>();
	
	public void add(double d) {
		histogram.add(d);
	}
	
	public double getValue (int i) {
		return histogram.get(i);
	}
	
	public void setValue (int i, double value) {
		histogram.set(i, value);
	}
	
	public void increase (int i) {
		if(i!=-1) {
			double value = histogram.get(i);
			value++;
			histogram.set(i, value);
		}	
	}
	
	public int getLength () {
		return histogram.size();
	}
	
	public ArrayList<Double> getHistogram () {
		return histogram;
	}
	
}
