@Override public int compareTo(IntTuple o) { int commonLen = Math.min(o.length(), length()); for (int i = 0; i < commonLen; i++) { int a = get(i); int b = o.get(i); if (a < b) return -1; if (b < a) return 1; } if (o.length() == length()) { return 0; } else { return (length() < o.length())? -1:1; } }
public static IntTuple getIntTuple(List<Integer> integers) { IntTuple t = IntTuple.getIntTuple(integers.size()); for (int i = 0; i < t.length(); i++) { t.set(i, integers.get(i).intValue()); } return t; }
/** * the feature number of the original feature or -1 if this is for a prior * */ int featureOf(int index) { IntTuple i = featureIndex.get(index); if (i.length() == 1) { return -1; } return i.get(1); }
@Override public int compareTo(IntTuple o) { int commonLen = Math.min(o.length(), length()); for (int i = 0; i < commonLen; i++) { int a = get(i); int b = o.get(i); if (a < b) return -1; if (b < a) return 1; } if (o.length() == length()) { return 0; } else { return (length() < o.length())? -1:1; } }
@Override public int compareTo(IntTuple o) { int commonLen = Math.min(o.length(), length()); for (int i = 0; i < commonLen; i++) { int a = get(i); int b = o.get(i); if (a < b) return -1; if (b < a) return 1; } if (o.length() == length()) { return 0; } else { return (length() < o.length())? -1:1; } }
@Override public int compareTo(IntTuple o) { int commonLen = Math.min(o.length(), length()); for (int i = 0; i < commonLen; i++) { int a = get(i); int b = o.get(i); if (a < b) return -1; if (b < a) return 1; } if (o.length() == length()) { return 0; } else { return (length() < o.length())? -1:1; } }
public static IntTuple getIntTuple(List<Integer> integers) { IntTuple t = IntTuple.getIntTuple(integers.size()); for (int i = 0; i < t.length(); i++) { t.set(i, integers.get(i).intValue()); } return t; }
public static IntTuple getIntTuple(List<Integer> integers) { IntTuple t = IntTuple.getIntTuple(integers.size()); for (int i = 0; i < t.length(); i++) { t.set(i, integers.get(i).intValue()); } return t; }
public static IntTuple getIntTuple(List<Integer> integers) { IntTuple t = IntTuple.getIntTuple(integers.size()); for (int i = 0; i < t.length(); i++) { t.set(i, integers.get(i).intValue()); } return t; }
public static IntTuple getIntTuple(List<Integer> integers) { IntTuple t = IntTuple.getIntTuple(integers.size()); for (int i = 0; i < t.length(); i++) { t.set(i, integers.get(i).intValue()); } return t; }
/** * the feature number of the original feature or -1 if this is for a prior * */ int featureOf(int index) { IntTuple i = featureIndex.get(index); if (i.length() == 1) { return -1; } return i.get(1); }