Java Array Invert InvertVector(int v[])

Here you can find the source of InvertVector(int v[])

Description

Invert Vector

License

Open Source License

Declaration

private static int[] InvertVector(int v[]) 

Method Source Code

//package com.java2s;
//    it under the terms of the GNU General Public License as published by

public class Main {
    private static int[] InvertVector(int v[]) {

        int[] a = new int[v.length];

        for (int i = 0; i < v.length; i++) {
            a[i] = v[v.length - 1 - i];/*from  w  ww  .  j  ava  2 s . c o  m*/
        }

        return a;

    }
}

Related

  1. invertMap(int[] map)
  2. invertMapping(int[] mapping)
  3. invertOrder(double[] values)
  4. invertOrientation(int[] face)
  5. invertValues(double[] vector)