Java Array Swap swap(double x[], Object[] corr, int a, int b)

Here you can find the source of swap(double x[], Object[] corr, int a, int b)

Description

swap

License

Open Source License

Declaration

private static void swap(double x[], Object[] corr, int a, int b) 

Method Source Code

//package com.java2s;
/*//from www.  ja  v  a2s  .co m
 *  Util.java
 *  (FScape)
 *
 *  Copyright (c) 2001-2015 Hanns Holger Rutz. All rights reserved.
 *
 *  This software is published under the GNU General Public License v3+
 *
 *
 *   For further information, please contact Hanns Holger Rutz at
 *   contact@sciss.de
 *
 *
 *  Changelog:
 *      17-Jun-07   extended
 */

public class Main {
    private static void swap(double x[], Object[] corr, int a, int b) {
        final double tmpX = x[a];
        x[a] = x[b];
        x[b] = tmpX;
        final Object tmpCorr = corr[a];
        corr[a] = corr[b];
        corr[b] = tmpCorr;
    }
}

Related

  1. swap(byte[] bytes)
  2. swap(byte[] data)
  3. swap(byte[] data, int p, int q)
  4. swap(byte[] rv, int offsetA, int offsetB)
  5. swap(Comparable[] a, int oldIndex, int newIndex)
  6. swap(double[] a, int i, int j)
  7. swap(double[] array, int i, int j)
  8. swap(double[] data, int i, int j)
  9. swap(final byte[] array, int firstIndex, int secondIndex)