/** Returns a duplicate copy of this object. */ public IntDict copy() { IntDict outgoing = new IntDict(count); System.arraycopy(keys, 0, outgoing.keys, 0, count); System.arraycopy(values, 0, outgoing.values, 0, count); for (int i = 0; i < count; i++) { outgoing.indices.put(keys[i], i); } outgoing.count = count; return outgoing; }
/** Returns a duplicate copy of this object. */ public IntDict copy() { IntDict outgoing = new IntDict(count); System.arraycopy(keys, 0, outgoing.keys, 0, count); System.arraycopy(values, 0, outgoing.values, 0, count); for (int i = 0; i < count; i++) { outgoing.indices.put(keys[i], i); } outgoing.count = count; return outgoing; }
/** Count the number of times each String entry is found in this list. */ public IntDict getTally() { IntDict outgoing = new IntDict(); for (int i = 0; i < count; i++) { outgoing.increment(data[i]); } return outgoing; }
/** Count the number of times each String entry is found in this list. */ public IntDict getTally() { IntDict outgoing = new IntDict(); for (int i = 0; i < count; i++) { outgoing.increment(data[i]); } return outgoing; }
/** Create a dictionary associating each entry in this list to its index. */ public IntDict getOrder() { IntDict outgoing = new IntDict(); for (int i = 0; i < count; i++) { outgoing.set(data[i], i); } return outgoing; }
/** Create a dictionary associating each entry in this list to its index. */ public IntDict getOrder() { IntDict outgoing = new IntDict(); for (int i = 0; i < count; i++) { outgoing.set(data[i], i); } return outgoing; }
public IntDict getIntDict(int keyColumn, int valueColumn) { return new IntDict(getStringColumn(keyColumn), getIntColumn(valueColumn)); }
public IntDict getIntDict(String keyColumnName, String valueColumnName) { return new IntDict(getStringColumn(keyColumnName), getIntColumn(valueColumnName)); }
public IntDict getIntDict(int keyColumn, int valueColumn) { return new IntDict(getStringColumn(keyColumn), getIntColumn(valueColumn)); }
public IntDict getIntDict(String keyColumnName, String valueColumnName) { return new IntDict(getStringColumn(keyColumnName), getIntColumn(valueColumnName)); }