Examples of ensureCapacity()


Examples of cern.colt.list.DoubleArrayList.ensureCapacity()

              int expectedMaxSize = pos+colEntriesNumber+1;
              if (Ax.elements().length < expectedMaxSize)
              {
                if (linearWarningsEnabled)
                  System.out.println("buildMatrix: warning - resizing arrays Ax[thread "+threadNo+"] and Ai[thread "+threadNo+"] from "+Ax.elements().length+" to "+expectedMaxSize);
                Ax.ensureCapacity(expectedMaxSize);
                Ai.ensureCapacity(expectedMaxSize);
              }
   
              for(int i=0;i<colEntriesNumber;++i)
              {
View Full Code Here

Examples of cern.colt.list.IntArrayList.ensureCapacity()

              if (Ax.elements().length < expectedMaxSize)
              {
                if (linearWarningsEnabled)
                  System.out.println("buildMatrix: warning - resizing arrays Ax[thread "+threadNo+"] and Ai[thread "+threadNo+"] from "+Ax.elements().length+" to "+expectedMaxSize);
                Ax.ensureCapacity(expectedMaxSize);
                Ai.ensureCapacity(expectedMaxSize);
              }
   
              for(int i=0;i<colEntriesNumber;++i)
              {
                int currentValue = tmpAi.getQuick(i);
View Full Code Here

Examples of cern.colt.matrix.DoubleMatrix2D.ensureCapacity()

 
  System.out.println("\nNow filling...");
  //if (kind.equals("sparse")) ((SparseDoubleMatrix2D)matrix).elements.hashCollisions = 0;
  for (int i=0; i<runs; i++) {
    matrix.assign(0);
    matrix.ensureCapacity(initialCapacity);
    if (kind.equals("sparse")) ((SparseDoubleMatrix2D)matrix).ensureCapacity(initialCapacity);
    timer1.start();
    int value = 0;
    for (int row=0; row < rows; row++) {
      for (int column=0; column < columns; column++) {
View Full Code Here

Examples of cern.colt.matrix.DoubleMatrix2D.ensureCapacity()

 
  System.out.println("\nNow filling...");
  //if (kind.equals("sparse")) ((SparseDoubleMatrix2D)matrix).elements.hashCollisions = 0;
  for (int i=0; i<runs; i++) {
    matrix.assign(0);
    matrix.ensureCapacity(initialCapacity);
    if (kind.equals("sparse")) ((SparseDoubleMatrix2D)matrix).ensureCapacity(initialCapacity);
    timer1.start();
    int value = 0;
    for (int row=0; row < rows; row++) {
      for (int column=0; column < columns; column++) {
View Full Code Here

Examples of com.badlogic.gdx.utils.FloatArray.ensureCapacity()

      int vertexCount = frameVertices[0].length;

      FloatArray verticesArray = slot.getAttachmentVertices();
      if (verticesArray.size != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
      verticesArray.size = 0;
      verticesArray.ensureCapacity(vertexCount);
      verticesArray.size = vertexCount;
      float[] vertices = verticesArray.items;

      if (time >= frames[frames.length - 1]) { // Time is after last frame.
        float[] lastVertices = frameVertices[frames.length - 1];
View Full Code Here

Examples of com.badlogic.gdx.utils.IntArray.ensureCapacity()

        indices[i] = (short)(n - i); // Reversed.
    }

    IntArray vertexTypes = this.vertexTypes;
    vertexTypes.clear();
    vertexTypes.ensureCapacity(vertexCount);
    for (int i = 0, n = vertexCount; i < n; ++i)
      vertexTypes.add(classifyVertex(i));

    // A polygon with n vertices has a triangulation of n-2 triangles.
    ShortArray triangles = this.triangles;
View Full Code Here

Examples of com.badlogic.gdx.utils.ShortArray.ensureCapacity()

    this.vertices = vertices;
    int vertexCount = this.vertexCount = count / 2;

    ShortArray indicesArray = this.indicesArray;
    indicesArray.clear();
    indicesArray.ensureCapacity(vertexCount);
    indicesArray.size = vertexCount;
    short[] indices = this.indices = indicesArray.items;
    if (areVerticesClockwise(vertices, offset, count)) {
      for (short i = 0; i < vertexCount; i++)
        indices[i] = i;
View Full Code Here

Examples of com.browseengine.bobo.util.BigFloatArray.ensureCapacity()

      _zValArray = zvals;
    }
   
    public static BigFloatArray newInstance(int maxDoc) {
      BigFloatArray array = new BigFloatArray(maxDoc);
      array.ensureCapacity(maxDoc);
      return array;
    }
   
    /**
     * @return the _xValArray
View Full Code Here

Examples of com.browseengine.bobo.util.BigSegmentedArray.ensureCapacity()

    if (order == null) // we want to reuse the memory
    {
      order = newInstance(_termCountSize, maxDoc);
    } else
    {
      order.ensureCapacity(maxDoc); // no need to fill to 0, we are reseting the
                                    // data anyway
    }
    this.orderArray = order;

    IntArrayList minIDList = new IntArrayList();
View Full Code Here

Examples of com.caucho.util.CharBuffer.ensureCapacity()

                  + (read()));

    int len = length >> 1;

    CharBuffer cb = _cb;
    cb.ensureCapacity(len);
    char []cBuf = cb.getBuffer();
    int cLen = 0;

    for (; len > 0; len--) {
      int ch1 = read();
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.