@Test public void testCoordinateND() { CoordinateND<Short> prev = makeCoordinateND(2, 10); GribRecordStats counter = new GribRecordStats(); Formatter f = new Formatter(); prev.showInfo(f, counter); logger.debug("{}", f); logger.debug("prev {}", counter.show()); CoordinateND<Short> curr = makeCoordinateND(2, 11); counter = new GribRecordStats(); f = new Formatter(); curr.showInfo(f, counter); logger.debug("{}", f); logger.debug("curr {}", counter.show()); CoordinateND<Short> reindexed = new CoordinateND.Builder<Short>().reindex(curr.getCoordinates(), prev); counter = new GribRecordStats(); f = new Formatter(); reindexed.showInfo(f, counter); logger.debug("{}", f); logger.debug("reindexed {}", counter.show()); Assert2.assertNearlyEquals(curr.getSparseArray().getDensity(), 1.0f); Assert2.assertNearlyEquals(reindexed.getSparseArray().getDensity(), .826446f); }
CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa) { assert coordinates.size() == sa.getRank(); this.coordinates = Collections.unmodifiableList(coordinates); this.sa = sa; }
CoordinateND { CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa) { assert coordinates.size() == sa.getRank(); this.coordinates = Collections.unmodifiableList(coordinates); this.sa = sa; } }
CoordinateND { CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa) { assert coordinates.size() == sa.getRank(); this.coordinates = Collections.unmodifiableList(coordinates); this.sa = sa; } CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa); }
CoordinateND { CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa) { assert coordinates.size() == sa.getRank(); this.coordinates = Collections.unmodifiableList(coordinates); this.sa = sa; } CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa); List<Coordinate> getCoordinates(); SparseArray<T> getSparseArray(); void showInfo(Formatter info, GribRecordStats all); @Override String toString(); }
CoordinateND { CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa) { assert coordinates.size() == sa.getRank(); this.coordinates = Collections.unmodifiableList(coordinates); this.sa = sa; } CoordinateND(List<Coordinate> coordinates, SparseArray<T> sa); List<Coordinate> getCoordinates(); SparseArray<T> getSparseArray(); void showInfo(Formatter info, GribRecordStats all); @Override String toString();  }