Java Array Swap swapNumbers(int i, int j, double[] array)

Here you can find the source of swapNumbers(int i, int j, double[] array)

Description

swap Numbers

License

Open Source License

Parameter

Parameter Description
i row index
j col index
array modified vector

Declaration

private static void swapNumbers(int i, int j, double[] array) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from  www . j  av a  2  s .  c  o m*/
     * 
     * @param i
     *            row index
     * @param j
     *            col index
     * @param array
     *            modified vector
     */
    private static void swapNumbers(int i, int j, double[] array) {
        double temp;
        temp = array[i];
        array[i] = array[j];
        array[j] = temp;
    }
}

Related

  1. swapBytesAt(byte[] bytes, int p1, int p2)
  2. swapElements(final E[] arr, final int idx1, final int idx2)
  3. swapEndianFormat(byte[] b)
  4. swapInt(byte[] b, int i)
  5. swapInts(byte b[], int off, int len)
  6. swapObjects(Object[] array, int a, int b)
  7. swapOrder16(byte[] buffer, int byteOffset, int sampleCount)
  8. swapOrder32(byte[] buffer, int byteOffset, int sampleCount)
  9. swapParallel(Object[] x, Object[] y, int a, int b, int yrel)