Codota Logo
BooleanArrays.swap
Code IndexAdd Codota to your IDE (free)

How to use
swap
method
in
it.unimi.dsi.fastutil.booleans.BooleanArrays

Best Java code snippets using it.unimi.dsi.fastutil.booleans.BooleanArrays.swap (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: it.unimi.dsi/fastutil

private static void swap(final boolean[] x, final boolean[] y, int a, int b, final int n) {
  for (int i = 0; i < n; i++, a++, b++)
    swap(x, y, a, b);
}
origin: AliView/AliView

private static void vecSwap( final boolean[] x, int a, int b, final int n ) {
for( int i = 0; i < n; i++, a++, b++ ) swap( x, a, b );
}
private static int med3( final boolean x[], final int a, final int b, final int c, BooleanComparator comp ) {
origin: it.unimi.dsi/fastutil

/**
 * Swaps two sequences of elements of an array.
 *
 * @param x
 *            an array.
 * @param a
 *            a position in {@code x}.
 * @param b
 *            another position in {@code x}.
 * @param n
 *            the number of elements to exchange starting at {@code a} and
 *            {@code b}.
 */
public static void swap(final boolean[] x, int a, int b, final int n) {
  for (int i = 0; i < n; i++, a++, b++)
    swap(x, a, b);
}
private static int med3(final boolean x[], final int a, final int b, final int c, BooleanComparator comp) {
origin: it.unimi.dsi/fastutil

  while (b <= c && (comparison = (Boolean.compare((x[b]), (v)))) <= 0) {
    if (comparison == 0)
      swap(x, a++, b);
    b++;
      swap(x, c, d--);
    c--;
  swap(x, b++, c--);
swap(x, from, b - s, s);
s = Math.min(d - c, to - d - 1);
swap(x, b, to - s, s);
origin: it.unimi.dsi/fastutil

  while (b <= c && (comparison = (Boolean.compare((x[b]), (v)))) <= 0) {
    if (comparison == 0)
      swap(x, a++, b);
    b++;
      swap(x, c, d--);
    c--;
  swap(x, b++, c--);
swap(x, from, b - s, s);
s = Math.min(d - c, to - d - 1);
swap(x, b, to - s, s);
origin: it.unimi.dsi/fastutil

  while (b <= c && (comparison = comp.compare(x[b], v)) <= 0) {
    if (comparison == 0)
      swap(x, a++, b);
    b++;
      swap(x, c, d--);
    c--;
  swap(x, b++, c--);
swap(x, from, b - s, s);
s = Math.min(d - c, to - d - 1);
swap(x, b, to - s, s);
origin: it.unimi.dsi/fastutil

  while (b <= c && (comparison = comp.compare(x[b], v)) <= 0) {
    if (comparison == 0)
      swap(x, a++, b);
    b++;
      swap(x, c, d--);
    c--;
  swap(x, b++, c--);
swap(x, from, b - s, s);
s = Math.min(d - c, to - d - 1);
swap(x, b, to - s, s);
origin: it.unimi.dsi/fastutil

      : t) <= 0) {
    if (comparison == 0)
      swap(x, y, a++, b);
    b++;
      : t) >= 0) {
    if (comparison == 0)
      swap(x, y, c, d--);
    c--;
  swap(x, y, b++, c--);
swap(x, y, from, b - s, s);
s = Math.min(d - c, to - d - 1);
swap(x, y, b, to - s, s);
origin: AliView/AliView

int comparison;
while ( b <= c && ( comparison = ( !(x[ b ]) && (v) ? -1 : ( (x[ b ]) == (v) ? 0 : 1 ) ) ) <= 0 ) {
if ( comparison == 0 ) swap( x, a++, b );
b++;
if ( comparison == 0 ) swap( x, c, d-- );
c--;
swap( x, b++, c-- );
origin: AliView/AliView

int comparison;
while ( b <= c && ( comparison = comp.compare( x[ b ], v ) ) <= 0 ) {
if ( comparison == 0 ) swap( x, a++, b );
b++;
if ( comparison == 0 ) swap( x, c, d-- );
c--;
swap( x, b++, c-- );
it.unimi.dsi.fastutil.booleansBooleanArraysswap

Javadoc

Swaps two elements of an anrray.

Popular methods of BooleanArrays

  • quickSort
    Sorts the specified range of elements of two arrays according to the natural lexicographical ascendi
  • ensureCapacity
    Ensures that an array can contain the given number of entries, preserving just a part of the array.
  • ensureFromTo
    Ensures that a range given by its first (inclusive) and last (exclusive) elements fits an array. Thi
  • ensureOffsetLength
    Ensures that a range given by an offset and a length fits an array. This method may be used whenever
  • fill
    Fills the given array with the given value.
  • insertionSort
  • med3
  • mergeSort
    Sorts an array according to the order induced by the specified comparator using mergesort. This sort
  • selectionSort
  • trim
    Trims the given array to the given length.
  • ensureSameLength
    Ensures that two arrays are of the same length.
  • equals
    Returns true if the two arrays are elementwise equal.
  • ensureSameLength,
  • equals,
  • forceCapacity,
  • grow,
  • insertionSortIndirect,
  • med3Indirect,
  • parallelQuickSort,
  • parallelQuickSortIndirect,
  • quickSortIndirect

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • requestLocationUpdates (LocationManager)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • BoxLayout (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
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