Examples of computeSize()


Examples of ucar.ma2.Section.computeSize()

    int[] shape = new int[] {123,22,92,12};
    Section section = new Section(shape);
    IndexChunker index = new IndexChunker(shape, section);
    assert index.getTotalNelems() == section.computeSize();
    IndexChunker.Chunk chunk = index.next();
    assert chunk.getNelems() == section.computeSize();
    assert !index.hasNext();
  }

  public void testPart() throws InvalidRangeException {
    int[] full = new int[] {2, 10, 20};
View Full Code Here

Examples of ucar.ma2.Section.computeSize()

  public void testPart() throws InvalidRangeException {
    int[] full = new int[] {2, 10, 20};
    int[] part = new int[] {2, 5, 20};
    Section section = new Section(part);
    IndexChunker index = new IndexChunker(full, section);
    assert index.getTotalNelems() == section.computeSize();
    IndexChunker.Chunk chunk = index.next();
    assert chunk.getNelems() == section.computeSize()/2;
  }

  public void testChunkerTiled() throws InvalidRangeException {
View Full Code Here

Examples of ucar.ma2.Section.computeSize()

    int[] part = new int[] {2, 5, 20};
    Section section = new Section(part);
    IndexChunker index = new IndexChunker(full, section);
    assert index.getTotalNelems() == section.computeSize();
    IndexChunker.Chunk chunk = index.next();
    assert chunk.getNelems() == section.computeSize()/2;
  }

  public void testChunkerTiled() throws InvalidRangeException {
    Section dataSection = new Section("0:0, 20:39,  0:1353 ");
    Section wantSection = new Section("0:2, 22:3152,0:1350");
View Full Code Here

Examples of ucar.ma2.Section.computeSize()

      ucar.ma2.Array coordVals = vt.getCoordinateArray(0);
      assert (null != coordVals);

      Section cSection = new Section(coordVals.getShape());
      System.out.printf(" coordVal shape = %s %n", cSection);
      assert varSection.computeSize() == cSection.computeSize();

    } else {
      Dimension timeDim = ncd.findDimension(timeName);
      assert null != timeDim;
      vt = vct.makeVerticalTransform(ncd, timeDim);
View Full Code Here

Examples of ucar.ma2.Section.computeSize()

        ucar.ma2.ArrayDouble.D3 coordVals = vt.getCoordinateArray(i);
        assert (null != coordVals);
        Section cSection = new Section(coordVals.getShape());
        System.out.printf("%s: varSection shape = %s %n", v.getFullName(), varSection);
        System.out.printf("%s: coordVal shape = %s %n", v.getFullName(), cSection);
        assert varSection.computeSize() == cSection.computeSize();
      }
    }
    assert vt != null;
    assert vclass.isInstance(vt);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.