public static Cell1DDataset cell1DDatasetsFromVNumberArray(VNumberArray data) { return Cell1DDatasets.datasetFrom(data.getData(), data.getDimensionDisplay().get(0).getCellBoundaries(), toRange(data)); } }
@Override public Object calculate(List<Object> args) { if (NullUtils.containsNull(args)) { return null; } VNumberArray numberArray = (VNumberArray) args.get(0); double min = numberArray.getDimensionDisplay().get(0).getCellBoundaries().getDouble(0); double max = numberArray.getDimensionDisplay().get(0).getCellBoundaries().getDouble(numberArray.getSizes().getInt(0)); return newVNumberArray( new ArrayDouble(min, max), ValueUtil.highestSeverityOf(args, false), ValueUtil.latestValidTimeOrNowOf(args), displayNone()); }
this.values = data.getData(); if (data.getSizes().size() == 1) { this.xBoundaries = data.getDimensionDisplay().get(0).getCellBoundaries(); this.yBoundaries = new ArrayDouble(0, 1); this.array2D = new Array2DDouble(new ArrayInt(1, xBoundaries.size() - 1), false, data.getDimensionDisplay().get(0).isReversed()); } else if (data.getSizes().size() == 2) { this.xBoundaries = data.getDimensionDisplay().get(1).getCellBoundaries(); this.yBoundaries = data.getDimensionDisplay().get(0).getCellBoundaries(); this.array2D = new Array2DDouble(data.getSizes(), data.getDimensionDisplay().get(1).isReversed(), data.getDimensionDisplay().get(0).isReversed()); } else { throw new IllegalArgumentException("Array is 3D or more");
ArrayDimensionDisplay xDisplay = data.getDimensionDisplay().get(1); int leftIndex = (int) renderer.getXIndexSelectionRange().getMinimum(); int rightIndex = (int) renderer.getXIndexSelectionRange().getMaximum(); ArrayDimensionDisplay yDisplay = data.getDimensionDisplay().get(0); int bottomIndex = (int) renderer.getYIndexSelectionRange().getMinimum(); int topIndex = (int) renderer.getYIndexSelectionRange().getMaximum();