@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]; }
/** * 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 midpoint[index]; }
@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(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 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(); }
/** * 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; }
/** * The "name" of the ith coordinate. If nominal, this is all there is to a coordinate. * If numeric, this will return a String representation of the coordinate. * * @param index which one ? * @return the ith coordinate value as a String */ public String getCoordName(int index) { if (!wasRead) doRead(); if (isNumeric()) return Format.d(getCoordValue(index), 5, 8); else return names[index]; }
/** * The "name" of the ith coordinate. If nominal, this is all there is to a coordinate. * If numeric, this will return a String representation of the coordinate. * * @param index which one ? * @return the ith coordinate value as a String */ public String getCoordName(int index) { if (!wasRead) doRead(); if (isNumeric()) return Format.d(getCoordValue(index), 5, 8); else return names[index]; }
/** * The "name" of the ith coordinate. If nominal, this is all there is to a coordinate. * If numeric, this will return a String representation of the coordinate. * * @param index which one ? * @return the ith coordinate value as a String */ public String getCoordName(int index) { if (!wasRead) doRead(); if (isNumeric()) return Format.d(getCoordValue(index), 5, 8); else return names[index]; }