/** * Extend lower bounds. */ public void extendLowerBound(double[] bound) { if (bound.length != dimension) { throw new IllegalArgumentException(BOUND_SIZE_DON_T_MATCH_THE_DIMENSION); } boolean extend = false; for (int i = 0; i < bound.length; i++) { if (bound[i] < originalLowerBound[i]) { originalLowerBound[i] = bound[i]; extend = true; } } if (extend) { reset(); } }
/** * Extend upper bounds. */ public void extendUpperBound(double[] bound) { if (bound.length != dimension) { throw new IllegalArgumentException(BOUND_SIZE_DON_T_MATCH_THE_DIMENSION); } boolean extend = false; for (int i = 0; i < bound.length; i++) { if (bound[i] > originalUpperBound[i]) { originalUpperBound[i] = bound[i]; extend = true; } } if (extend) { reset(); } }
/** * Extend lower and upper bounds. */ public void extendBound(double[] lowerBound, double[] upperBound) { if (lowerBound.length != dimension || upperBound.length != dimension) { throw new IllegalArgumentException(BOUND_SIZE_DON_T_MATCH_THE_DIMENSION); } boolean extend = false; for (int i = 0; i < lowerBound.length; i++) { if (lowerBound[i] < this.originalLowerBound[i]) { this.originalLowerBound[i] = lowerBound[i]; extend = true; } } for (int i = 0; i < upperBound.length; i++) { if (upperBound[i] > this.originalUpperBound[i]) { this.originalUpperBound[i] = upperBound[i]; extend = true; } } if (extend) { reset(); } }
this.upperBound = new double[dimension]; reset();
/** * Resets the plot. */ public void reset() { base.reset(); graphics.projection.reset(); baseGrid.setBase(base); if (graphics.projection instanceof Projection3D) { ((Projection3D) graphics.projection).setDefaultView(); } canvas.repaint(); }