public void resetData(double[] x, double[] y){
        	this.nPoints = this.nPointsOriginal;
        	if(x.length!=y.length)throw new IllegalArgumentException("Arrays x and y are of different length");
        	if(this.nPoints!=x.length)throw new IllegalArgumentException("Original array length not matched by new array length");

        	for(int i=0; i<this.nPoints; i++){
            		this.x[i]=x[i];
            		this.y[i]=y[i];
        	}
        	this.orderPoints();
        	this.checkForIdenticalPoints();
    	}