Package java.nio

Examples of java.nio.IntBuffer.slice()


  @Override
  public double getQuick(int rowIndex, int columnIndex) {
    IntBuffer tmp = data.get(bufferIndex[rowIndex]).asReadOnlyBuffer();
    tmp.position(rowOffset[rowIndex]);
    tmp.limit(rowSize[rowIndex]);
    tmp = tmp.slice();
    return searchForIndex(tmp, columnIndex);
  }

  private static double searchForIndex(IntBuffer row, int columnIndex) {
    int high = row.limit();
View Full Code Here


  @Override
  public Vector viewRow(int rowIndex) {
    IntBuffer tmp = data.get(bufferIndex[rowIndex]).asReadOnlyBuffer();
    tmp.position(rowOffset[rowIndex]);
    tmp.limit(rowOffset[rowIndex] + rowSize[rowIndex]);
    tmp = tmp.slice();
    return new SparseBinaryVector(tmp, columnSize());
  }

  private static class SparseBinaryVector extends AbstractVector {
    private final IntBuffer buffer;
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.