Tabnine Logo
TimSorter.binarySort
Code IndexAdd Tabnine to your IDE (free)

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

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

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.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.utilTimSorterbinarySort

Popular methods of TimSorter

  • 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
  • mergeHi
  • mergeAt,
  • mergeHi,
  • mergeInPlace,
  • mergeLo,
  • minRun,
  • nextRun,
  • pushRunLen,
  • reset,
  • restore

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Runner (org.openjdk.jmh.runner)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now