Package com.almworks.integers.func

Examples of com.almworks.integers.func.IntIntToInt


        .append("\ncolor ").append(myBlack.get(node) ? "BLACK\n" : "RED\n");
  }

  final void debugPrintTreeStructure(final PrintStream out) {
    out.println("Legend: x - black node, o - red node, # - NIL");
    visitULR(0, new IntIntToInt() {
      @Override
      public int invoke(int x, int level) {
        out.print(' ');
        for (int i = 0; i < level - 1; ++i) out.print("| ");
        if (level > 0) out.append("|-");
View Full Code Here


   * @throws IllegalArgumentException in case {@code secondary} is shorter than the {@code primary}
   * */
  public static void sortPairs(final WritableIntList primary, final WritableIntList secondary) throws IllegalArgumentException {
    if (primary.size() > secondary.size()) throw new IllegalArgumentException("secondary is shorter than primary: " +
        primary.size() + " > " + secondary.size());
    IntegersUtils.quicksort(primary.size(), new IntIntToInt() {
          @Override
          public int invoke(int i, int j) {
            int comp = IntCollections.compare(primary.get(i), primary.get(j));
            if (comp == 0) comp = IntCollections.compare(secondary.get(i), secondary.get(j));
            return comp;
View Full Code Here

TOP

Related Classes of com.almworks.integers.func.IntIntToInt

Copyright © 2018 www.massapicom. 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.