@Override public double getMinValue() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.min(coords[0], coords[coords.length - 1]); }
@Override public double getMaxValue() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.max(coords[0], coords[coords.length - 1]); }
/** * Get the ith coordinate value. This is the value of the coordinate axis at which * the data value is associated. These must be strictly monotonic. * * @param index which coordinate. Between 0 and getNumElements()-1 inclusive. * @return coordinate value. * @throws UnsupportedOperationException if !isNumeric() */ public double getCoordValue(int index) { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return coords[index]; }
/** * Get the ith coordinate value. This is the value of the coordinate axis at which * the data value is associated. These must be strictly monotonic. * * @param index which coordinate. Between 0 and getNumElements()-1 inclusive. * @return coordinate value. * @throws UnsupportedOperationException if !isNumeric() */ public double getCoordValue(int index) { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return coords[index]; }
@Override public double getMaxValue() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.max(coords[0], coords[(int) getSize() - 1]); }
@Override public double getMinValue() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.min(coords[0], coords[(int) getSize() - 1]); }
public double getMinEdgeValue() { if (edge == null) return getMinValue(); if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.min(edge[0], edge[edge.length - 1]); }
@Override public double getMinValue() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.min(midpoint[0], midpoint[(int) getSize() - 1]); }
@Override public double getMaxValue() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.max(midpoint[0], midpoint[(int) getSize() - 1]); }
public double getMaxEdgeValue() { if (edge == null) return getMaxValue(); if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValue() on non-numeric"); if (!wasRead) doRead(); return Math.max(edge[0], edge[edge.length - 1]); }
/** * Get the coordinate values as a double array. * * @return coordinate value. * @throws UnsupportedOperationException if !isNumeric() */ public double[] getCoordValues() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValues() on non-numeric"); if (!wasRead) doRead(); return midpoint.clone(); }
/** * Get the coordinate values as a double array. * * @return coordinate value. * @throws UnsupportedOperationException if !isNumeric() */ public double[] getCoordValues() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValues() on non-numeric"); if (!wasRead) doRead(); return coords.clone(); }
/** * Get the coordinate values as a double array. * * @return coordinate value. * @throws UnsupportedOperationException if !isNumeric() */ public double[] getCoordValues() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordValues() on non-numeric"); if (!wasRead) doRead(); return coords.clone(); }
/** * Get the coordinate edges as a double array. * Exact only if isContiguous() is true, otherwise use getBound1() and getBound2(). * * @return coordinate edges. * @throws UnsupportedOperationException if !isNumeric() */ public double[] getCoordEdges() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordEdges() on non-numeric"); if (!wasBoundsDone) makeBounds(); return edge.clone(); }
/** * Get the coordinate edges as a double array. * Exact only if isContiguous() is true, otherwise use getBound1() and getBound2(). * * @return coordinate edges. * @throws UnsupportedOperationException if !isNumeric() */ public double[] getCoordEdges() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordEdges() on non-numeric"); if (!wasBoundsDone) makeBounds(); return edge.clone(); }
/** * Get the coordinate edges as a double array. * Exact only if isContiguous() is true, otherwise use getBound1() and getBound2(). * * @return coordinate edges. * @throws UnsupportedOperationException if !isNumeric() */ public double[] getCoordEdges() { if (!isNumeric()) throw new UnsupportedOperationException("CoordinateAxis1D.getCoordEdges() on non-numeric"); if (!wasBoundsDone) makeBounds(); return edge.clone(); }
public Axis( CoordinateAxis1D coordAxis) { this.coordAxis = coordAxis; this.name = this.coordAxis.getFullName(); this.label = this.coordAxis.getFullName(); this.description = this.coordAxis.getDescription(); this.isNumeric = this.coordAxis.isNumeric(); this.values = new ArrayList<String>(); for ( int i = 0; i < this.coordAxis.getSize(); i++ ) this.values.add( this.coordAxis.getCoordName( i ).trim() ); }
/** * Calculate bounds, set isInterval, isContiguous */ private void makeBounds() { if (!wasRead) doRead(); if (isNumeric()) { if (!makeBoundsFromAux()) { makeEdges(); } } wasBoundsDone = true; }
private void makeBounds() { if (!wasRead) doRead(); if (isNumeric()) { if (!makeBoundsFromAux()) { makeEdges(); } } wasBoundsDone = true; }
/** * Calculate bounds, set isInterval, isContiguous */ private void makeBounds() { if (!wasRead) doRead(); if (isNumeric()) { if (!makeBoundsFromAux()) { makeEdges(); } } wasBoundsDone = true; }