class SparseVector extends Vector {

	@Override
	public SparseVector append(double d) {
		int[] indices = new int[this.indices.length + 1];
		double[] values = new double[this.values.length + 1];
		int n = (this.n >= 0) ? this.n + 1 : this.n;

		System.arraycopy(this.indices, 0, indices, 0, this.indices.length);
		System.arraycopy(this.values, 0, values, 0, this.values.length);

		indices[this.indices.length] = n - 1;
		values[this.values.length] = d;

		return new SparseVector(n, indices, values);
	}

	public  SparseVector();
	public  SparseVector(int n);
	public  SparseVector(int n, int[] indices, double[] values);
	public  SparseVector(int n, Map<Integer, Double> kv);

}