package multinomad.tools.kmeansML;

import java.util.ArrayList;

public class Centroids {
	private ArrayList<Double> attributes;
	
	public Centroids() {
		attributes = new ArrayList<Double>();
	}
	
	public ArrayList<Double> getAttributes(){
		return attributes;
	}
	
	public void addAttribute(Double e) {
		attributes.add(e);
	}
	
	public double[] getAttributesAsdouble(){
		double [] attr = new double[attributes.size()];
		int i=0;
		for (Double value : attributes) {
			attr[i] = value.doubleValue();
			i++;
		}
		return attr;
	}
	
	public String getAttributesAsString(){
		String attr = "";
		for (Double value : attributes) {
			attr += value.doubleValue()+" ";
		}
		return attr;
	}

}
