thinking about adding getTally() to IntDict

This commit is contained in:
Ben Fry
2017-04-17 13:23:46 -04:00
parent 698aafa72e
commit c611de43ae
+13
View File
@@ -852,6 +852,19 @@ public class IntList implements Iterable<Integer> {
}
// /**
// * Count the number of times each entry is found in this list.
// * Converts each entry to a String so it can be used as a key.
// */
// public IntDict getTally() {
// IntDict outgoing = new IntDict();
// for (int i = 0; i < count; i++) {
// outgoing.increment(String.valueOf(data[i]));
// }
// return outgoing;
// }
public IntList getSubset(int start) {
return getSubset(start, count - start);
}