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

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

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

origin: org.apache.lucene/lucene-core

void mergeHi(int lo, int mid, int hi) {
 assert compare(mid - 1, hi - 1) > 0;
 int len2 = hi - mid;
 save(mid, len2);
 copy(mid - 1, hi - 1);
 int i = mid - 2, j = len2 - 1, dest = hi - 2;
 outer: for (;;) {
  for (int count = 0; count < MIN_GALLOP; ) {
   if (i < lo || j < 0) {
    break outer;
   } else if (compareSaved(j, i) >= 0) {
    restore(j--, dest--);
    count = 0;
   } else {
    copy(i--, dest--);
    ++count;
   }
  }
  // galloping
  int next = upperSaved3(lo, i + 1, j);
  while (i >= next) {
   copy(i--, dest--);
  }
  restore(j--, dest--);
 }
 for (; j >= 0; --dest) {
  restore(j--, dest);
 }
 assert i == dest;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

void mergeHi(int lo, int mid, int hi) {
 assert compare(mid - 1, hi - 1) > 0;
 int len2 = hi - mid;
 save(mid, len2);
 copy(mid - 1, hi - 1);
 int i = mid - 2, j = len2 - 1, dest = hi - 2;
 outer: for (;;) {
  for (int count = 0; count < MIN_GALLOP; ) {
   if (i < lo || j < 0) {
    break outer;
   } else if (compareSaved(j, i) >= 0) {
    restore(j--, dest--);
    count = 0;
   } else {
    copy(i--, dest--);
    ++count;
   }
  }
  // galloping
  int next = upperSaved3(lo, i + 1, j);
  while (i >= next) {
   copy(i--, dest--);
  }
  restore(j--, dest--);
 }
 for (; j >= 0; --dest) {
  restore(j--, dest);
 }
 assert i == dest;
}
origin: org.infinispan/infinispan-embedded-query

void mergeHi(int lo, int mid, int hi) {
 assert compare(mid - 1, hi - 1) > 0;
 int len2 = hi - mid;
 save(mid, len2);
 copy(mid - 1, hi - 1);
 int i = mid - 2, j = len2 - 1, dest = hi - 2;
 outer: for (;;) {
  for (int count = 0; count < MIN_GALLOP; ) {
   if (i < lo || j < 0) {
    break outer;
   } else if (compareSaved(j, i) >= 0) {
    restore(j--, dest--);
    count = 0;
   } else {
    copy(i--, dest--);
    ++count;
   }
  }
  // galloping
  int next = upperSaved3(lo, i + 1, j);
  while (i >= next) {
   copy(i--, dest--);
  }
  restore(j--, dest--);
 }
 for (; j >= 0; --dest) {
  restore(j--, dest);
 }
 assert i == dest;
}
origin: harbby/presto-connectors

void mergeHi(int lo, int mid, int hi) {
 assert compare(mid - 1, hi - 1) > 0;
 int len2 = hi - mid;
 save(mid, len2);
 copy(mid - 1, hi - 1);
 int i = mid - 2, j = len2 - 1, dest = hi - 2;
 outer: for (;;) {
  for (int count = 0; count < MIN_GALLOP; ) {
   if (i < lo || j < 0) {
    break outer;
   } else if (compareSaved(j, i) >= 0) {
    restore(j--, dest--);
    count = 0;
   } else {
    copy(i--, dest--);
    ++count;
   }
  }
  // galloping
  int next = upperSaved3(lo, i + 1, j);
  while (i >= next) {
   copy(i--, dest--);
  }
  restore(j--, dest--);
 }
 for (; j >= 0; --dest) {
  restore(j--, dest);
 }
 assert i == dest;
}
org.apache.lucene.utilTimSorterupperSaved3

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

  • Making http post requests using okhttp
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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