List of utility methods to do Array Invert
int[] | invertList(int[] pos) invert List int[] result = new int[pos.length]; for (int i = 0; i < pos.length; i++) { result[pos[i]] = i; return result; |
int[] | invertMap(int[] map) invert Map int[] re = new int[max(map) + 1]; Arrays.fill(re, -1); for (int i = 0; i < map.length; i++) re[map[i]] = i; return re; |
void | invertMapping(int[] mapping) Inverts the mapping into the source array. invertMapping(mapping, mapping); |
void | invertOrder(double[] values) Inverts the order of the values in an array of doubles. final int length = values.length; final int halfLength = length / 2; for (int i = 0; i < halfLength; i++) { final double temp = values[i]; values[i] = values[length - i - 1]; values[length - i - 1] = temp; |
void | invertOrientation(int[] face) inverts the order of the vertexIndices int[] result = new int[face.length]; for (int i = 0; i < result.length; i++) { result[i] = face[(face.length - i - 1)]; System.arraycopy(result, 0, face, 0, face.length); |
void | invertValues(double[] vector) invert Values for (int i = 0; i < vector.length; i++) vector[i] = 1.0 / vector[i]; |
int[] | InvertVector(int v[]) Invert Vector int[] a = new int[v.length]; for (int i = 0; i < v.length; i++) { a[i] = v[v.length - 1 - i]; return a; |