Codota Logo
TimSorter.reverse
Code IndexAdd Codota to your IDE (free)

How to use
reverse
method
in
org.apache.lucene.util.TimSorter

Best Java code snippets using org.apache.lucene.util.TimSorter.reverse (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.apache.lucene/lucene-core

@Override
void doRotate(int lo, int mid, int hi) {
 final int len1 = mid - lo;
 final int len2 = hi - mid;
 if (len1 == len2) {
  while (mid < hi) {
   swap(lo++, mid++);
  }
 } else if (len2 < len1 && len2 <= maxTempSlots) {
  save(mid, len2);
  for (int i = lo + len1 - 1, j = hi - 1; i >= lo; --i, --j) {
   copy(i, j);
  }
  for (int i = 0, j = lo; i < len2; ++i, ++j) {
   restore(i, j);
  }
 } else if (len1 <= maxTempSlots) {
  save(lo, len1);
  for (int i = mid, j = lo; i < hi; ++i, ++j) {
   copy(i, j);
  }
  for (int i = 0, j = lo + len2; j < hi; ++i, ++j) {
   restore(i, j);
  }
 } else {
  reverse(lo, mid);
  reverse(mid, hi);
  reverse(lo, hi);
 }
}
origin: org.apache.lucene/lucene-core

/** Compute the length of the next run, make the run sorted and return its
 *  length. */
int nextRun() {
 final int runBase = runEnd(0);
 assert runBase < to;
 if (runBase == to - 1) {
  return 1;
 }
 int o = runBase + 2;
 if (compare(runBase, runBase+1) > 0) {
  // run must be strictly descending
  while (o < to && compare(o - 1, o) > 0) {
   ++o;
  }
  reverse(runBase, o);
 } else {
  // run must be non-descending
  while (o < to && compare(o - 1, o) <= 0) {
   ++o;
  }
 }
 final int runHi = Math.max(o, Math.min(to, runBase + minRun));
 binarySort(runBase, runHi, o);
 return runHi - runBase;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

@Override
void doRotate(int lo, int mid, int hi) {
 final int len1 = mid - lo;
 final int len2 = hi - mid;
 if (len1 == len2) {
  while (mid < hi) {
   swap(lo++, mid++);
  }
 } else if (len2 < len1 && len2 <= maxTempSlots) {
  save(mid, len2);
  for (int i = lo + len1 - 1, j = hi - 1; i >= lo; --i, --j) {
   copy(i, j);
  }
  for (int i = 0, j = lo; i < len2; ++i, ++j) {
   restore(i, j);
  }
 } else if (len1 <= maxTempSlots) {
  save(lo, len1);
  for (int i = mid, j = lo; i < hi; ++i, ++j) {
   copy(i, j);
  }
  for (int i = 0, j = lo + len2; j < hi; ++i, ++j) {
   restore(i, j);
  }
 } else {
  reverse(lo, mid);
  reverse(mid, hi);
  reverse(lo, hi);
 }
}
origin: org.infinispan/infinispan-embedded-query

@Override
void doRotate(int lo, int mid, int hi) {
 final int len1 = mid - lo;
 final int len2 = hi - mid;
 if (len1 == len2) {
  while (mid < hi) {
   swap(lo++, mid++);
  }
 } else if (len2 < len1 && len2 <= maxTempSlots) {
  save(mid, len2);
  for (int i = lo + len1 - 1, j = hi - 1; i >= lo; --i, --j) {
   copy(i, j);
  }
  for (int i = 0, j = lo; i < len2; ++i, ++j) {
   restore(i, j);
  }
 } else if (len1 <= maxTempSlots) {
  save(lo, len1);
  for (int i = mid, j = lo; i < hi; ++i, ++j) {
   copy(i, j);
  }
  for (int i = 0, j = lo + len2; j < hi; ++i, ++j) {
   restore(i, j);
  }
 } else {
  reverse(lo, mid);
  reverse(mid, hi);
  reverse(lo, hi);
 }
}
origin: harbby/presto-connectors

@Override
void doRotate(int lo, int mid, int hi) {
 final int len1 = mid - lo;
 final int len2 = hi - mid;
 if (len1 == len2) {
  while (mid < hi) {
   swap(lo++, mid++);
  }
 } else if (len2 < len1 && len2 <= maxTempSlots) {
  save(mid, len2);
  for (int i = lo + len1 - 1, j = hi - 1; i >= lo; --i, --j) {
   copy(i, j);
  }
  for (int i = 0, j = lo; i < len2; ++i, ++j) {
   restore(i, j);
  }
 } else if (len1 <= maxTempSlots) {
  save(lo, len1);
  for (int i = mid, j = lo; i < hi; ++i, ++j) {
   copy(i, j);
  }
  for (int i = 0, j = lo + len2; j < hi; ++i, ++j) {
   restore(i, j);
  }
 } else {
  reverse(lo, mid);
  reverse(mid, hi);
  reverse(lo, hi);
 }
}
origin: org.infinispan/infinispan-embedded-query

/** Compute the length of the next run, make the run sorted and return its
 *  length. */
int nextRun() {
 final int runBase = runEnd(0);
 assert runBase < to;
 if (runBase == to - 1) {
  return 1;
 }
 int o = runBase + 2;
 if (compare(runBase, runBase+1) > 0) {
  // run must be strictly descending
  while (o < to && compare(o - 1, o) > 0) {
   ++o;
  }
  reverse(runBase, o);
 } else {
  // run must be non-descending
  while (o < to && compare(o - 1, o) <= 0) {
   ++o;
  }
 }
 final int runHi = Math.max(o, Math.min(to, runBase + minRun));
 binarySort(runBase, runHi, o);
 return runHi - runBase;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/** Compute the length of the next run, make the run sorted and return its
 *  length. */
int nextRun() {
 final int runBase = runEnd(0);
 assert runBase < to;
 if (runBase == to - 1) {
  return 1;
 }
 int o = runBase + 2;
 if (compare(runBase, runBase+1) > 0) {
  // run must be strictly descending
  while (o < to && compare(o - 1, o) > 0) {
   ++o;
  }
  reverse(runBase, o);
 } else {
  // run must be non-descending
  while (o < to && compare(o - 1, o) <= 0) {
   ++o;
  }
 }
 final int runHi = Math.max(o, Math.min(to, runBase + minRun));
 binarySort(runBase, runHi, o);
 return runHi - runBase;
}
origin: harbby/presto-connectors

/** Compute the length of the next run, make the run sorted and return its
 *  length. */
int nextRun() {
 final int runBase = runEnd(0);
 assert runBase < to;
 if (runBase == to - 1) {
  return 1;
 }
 int o = runBase + 2;
 if (compare(runBase, runBase+1) > 0) {
  // run must be strictly descending
  while (o < to && compare(o - 1, o) > 0) {
   ++o;
  }
  reverse(runBase, o);
 } else {
  // run must be non-descending
  while (o < to && compare(o - 1, o) <= 0) {
   ++o;
  }
 }
 final int runHi = Math.max(o, Math.min(to, runBase + minRun));
 binarySort(runBase, runHi, o);
 return runHi - runBase;
}
org.apache.lucene.utilTimSorterreverse

Popular methods of TimSorter

  • binarySort
  • checkRange
  • compare
  • compareSaved
    Compare element i from the temporary storage with elementj from the slice to sort, similarly to #com
  • copy
    Copy data from slot src to slot dest.
  • ensureInvariants
  • exhaustStack
  • lower2
  • lowerSaved
  • lowerSaved3
  • merge
  • mergeAt
  • merge,
  • mergeAt,
  • mergeHi,
  • mergeInPlace,
  • mergeLo,
  • minRun,
  • nextRun,
  • pushRunLen,
  • reset,
  • restore

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Path (java.nio.file)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now