Examples of IntArrayList


Examples of org.apache.mahout.math.list.IntArrayList

  /**
   * Returns a string representation of the receiver, containing the String representation of each key-value pair,
   * sorted ascending by value.
   */
  public String toStringByValue() {
    IntArrayList theKeys = new IntArrayList();
    keysSortedByValue(theKeys);

    StringBuilder buf = new StringBuilder();
    buf.append('[');
    int maxIndex = theKeys.size() - 1;
    for (int i = 0; i <= maxIndex; i++) {
      int key = theKeys.get(i);
      buf.append(String.valueOf(key));
      buf.append("->");
      buf.append(String.valueOf(get(key)));
      if (i < maxIndex) {
        buf.append(", ");
View Full Code Here

Examples of org.apache.mahout.math.list.IntArrayList

   * #forEachKey(IntProcedure)}. <p> This method can be used to iterate over the keys of the receiver.
   *
   * @return the keys.
   */
  public IntArrayList keys() {
    IntArrayList list = new IntArrayList(size());
    keys(list);
    return list;
  }
View Full Code Here

Examples of org.apache.mahout.math.list.IntArrayList

  /**
   * Returns a string representation of the receiver, containing the String representation of each key-value pair,
   * sorted ascending by key.
   */
  public String toString() {
    IntArrayList theKeys = keys();
    //theKeys.sort();

    StringBuilder buf = new StringBuilder();
    buf.append('[');
    int maxIndex = theKeys.size() - 1;
    for (int i = 0; i <= maxIndex; i++) {
      int key = theKeys.get(i);
      buf.append(String.valueOf(key));
      if (i < maxIndex) {
        buf.append(", ");
      }
    }
View Full Code Here

Examples of org.apache.mahout.math.list.IntArrayList

  public IntBuffer2D(IntBuffer2DConsumer target, int capacity) {
    this.target = target;
    this.capacity = capacity;
    this.xElements = new int[capacity];
    this.yElements = new int[capacity];
    this.xList = new IntArrayList(xElements);
    this.yList = new IntArrayList(yElements);
    this.size = 0;
  }
View Full Code Here

Examples of org.apache.mahout.math.list.IntArrayList

    this.target = target;
    this.capacity = capacity;
    this.xElements = new int[capacity];
    this.yElements = new int[capacity];
    this.zElements = new int[capacity];
    this.xList = new IntArrayList(xElements);
    this.yList = new IntArrayList(yElements);
    this.zList = new IntArrayList(zElements);
    this.size = 0;
  }
View Full Code Here

Examples of org.apache.mahout.math.list.IntArrayList

   * (8,6,7)</tt>
   *
   * @param keyList the list to be filled, can have any size.
   */
  public void keysSortedByValue(CharArrayList keyList) {
    pairsSortedByValue(keyList, new IntArrayList(size()));
  }
View Full Code Here

Examples of org.apache.mahout.math.list.IntArrayList

   * #forEachKey(CharProcedure)}. <p> This method can be used to iterate over the values of the receiver.
   *
   * @return the values.
   */
  public IntArrayList values() {
    IntArrayList list = new IntArrayList(size());
    values(list);
    return list;
  }
View Full Code Here

Examples of org.broad.igv.util.collections.IntArrayList

    **/
    @Ignore
    @Test
    public void compareMemory() throws Exception {

        IntArrayList tmp = makeIntArrayList();
        ArrayList<Integer> tmp2 = makeArrayList();
        long memIntArrList = 0;
        long memArrList = 0;

        for (int ii = 0; ii < size; ii++) {
            memArrList += JavaAgent.getObjectSize(tmp2.get(ii));
            memIntArrList += JavaAgent.getObjectSize(tmp.get(ii));
        }
        assertTrue(memIntArrList < memArrList);

    }
View Full Code Here

Examples of stallone.doubles.fastutils.IntArrayList

    @Override
    public void setInput(IDataInput _data)
    {
        this.data = _data.singles();
        this.size = _data.size();
        assignedClusters = new IntArrayList();
    }
View Full Code Here

Examples of xbird.util.collections.IntArrayList

    public static int[] decode(final byte[] binary, final int len) {
        if(len == 0) {
            return null;
        }
        IntArrayList res = new IntArrayList((int) (len * 0.75));
        int code;
        for(int offset = 0; (code = decodeCharacter(binary, offset, 0, 0)) != EOF; offset += characterSize(code)) {
            res.add(code);
        }
        return res.toArray();
    }
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.