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

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

Best Java code snippets using org.apache.lucene.util.TimSorter.runEnd (Showing top 12 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

void mergeAt(int n) {
 assert stackSize >= 2;
 merge(runBase(n + 1), runBase(n), runEnd(n));
 for (int j = n + 1; j > 0; --j) {
  setRunEnd(j, runEnd(j-1));
 }
 --stackSize;
}
origin: org.apache.lucene/lucene-core

@Override
public void sort(int from, int to) {
 checkRange(from, to);
 if (to - from <= 1) {
  return;
 }
 reset(from, to);
 do {
  ensureInvariants();
  pushRunLen(nextRun());
 } while (runEnd(0) < to);
 exhaustStack();
 assert runEnd(0) == to;
}
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

void mergeAt(int n) {
 assert stackSize >= 2;
 merge(runBase(n + 1), runBase(n), runEnd(n));
 for (int j = n + 1; j > 0; --j) {
  setRunEnd(j, runEnd(j-1));
 }
 --stackSize;
}
origin: harbby/presto-connectors

void mergeAt(int n) {
 assert stackSize >= 2;
 merge(runBase(n + 1), runBase(n), runEnd(n));
 for (int j = n + 1; j > 0; --j) {
  setRunEnd(j, runEnd(j-1));
 }
 --stackSize;
}
origin: org.infinispan/infinispan-embedded-query

void mergeAt(int n) {
 assert stackSize >= 2;
 merge(runBase(n + 1), runBase(n), runEnd(n));
 for (int j = n + 1; j > 0; --j) {
  setRunEnd(j, runEnd(j-1));
 }
 --stackSize;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

@Override
public void sort(int from, int to) {
 checkRange(from, to);
 if (to - from <= 1) {
  return;
 }
 reset(from, to);
 do {
  ensureInvariants();
  pushRunLen(nextRun());
 } while (runEnd(0) < to);
 exhaustStack();
 assert runEnd(0) == to;
}
origin: org.infinispan/infinispan-embedded-query

@Override
public void sort(int from, int to) {
 checkRange(from, to);
 if (to - from <= 1) {
  return;
 }
 reset(from, to);
 do {
  ensureInvariants();
  pushRunLen(nextRun());
 } while (runEnd(0) < to);
 exhaustStack();
 assert runEnd(0) == to;
}
origin: harbby/presto-connectors

@Override
public void sort(int from, int to) {
 checkRange(from, to);
 if (to - from <= 1) {
  return;
 }
 reset(from, to);
 do {
  ensureInvariants();
  pushRunLen(nextRun());
 } while (runEnd(0) < to);
 exhaustStack();
 assert runEnd(0) == to;
}
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.utilTimSorterrunEnd

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

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Join (org.hibernate.mapping)
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