public class IntArrays extends Object
| Modifier and Type | Field and Description |
|---|---|
static int[] |
EMPTY_INT_ARRAY |
| Constructor and Description |
|---|
IntArrays() |
| Modifier and Type | Method and Description |
|---|---|
static long |
arrayProduct(int[] vs) |
static long |
arrayProduct(int[] vs,
int from,
int to) |
static int[] |
calcStrides(int[] shape)
Computes the standard packed array strides for a given shape.
|
static int[] |
consArray(int a,
int[] as) |
static long[] |
copyIntsToLongs(int[] src) |
static long[] |
copyIntsToLongs(int[] src,
long[] dst) |
static int[] |
copyOf(int[] data) |
static int[] |
create(double[] ls) |
static int[] |
create(List<?> ls) |
static int[] |
create(Object o) |
static int[] |
decrementAll(int[] xs) |
static int |
dotProduct(int[] xs,
int[] ys) |
static boolean |
equals(int[] as,
int[] bs)
Tests if two int array scontain equal values.
|
static int[] |
incrementAll(int[] xs) |
static int[] |
of(int... ints) |
static int[] |
rand(int[] shape)
Creates a randomised int[] array, each element in the range [0..max)
where max is the corresponding element in the shape array
|
static int[] |
rand(int[] shape,
Random r) |
static int[] |
removeIndex(int[] data,
int index) |
static int[] |
reverse(int[] data) |
static void |
swap(int[] inds,
int a,
int b) |
public static int[] of(int... ints)
public static int[] create(Object o)
public static int[] create(double[] ls)
public static int[] create(List<?> ls)
public static int[] removeIndex(int[] data,
int index)
public static int[] reverse(int[] data)
public static int[] consArray(int a,
int[] as)
public static long[] copyIntsToLongs(int[] src,
long[] dst)
public static long[] copyIntsToLongs(int[] src)
public static long arrayProduct(int[] vs)
public static long arrayProduct(int[] vs,
int from,
int to)
public static final int[] calcStrides(int[] shape)
shape - public static boolean equals(int[] as,
int[] bs)
as - bs - public static int[] rand(int[] shape)
shape - public static int[] rand(int[] shape,
Random r)
public static int dotProduct(int[] xs,
int[] ys)
public static int[] decrementAll(int[] xs)
public static int[] incrementAll(int[] xs)
public static void swap(int[] inds,
int a,
int b)
public static final int[] copyOf(int[] data)
Copyright © 2013. All Rights Reserved.