public final class ArrayUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static double[] |
convertToDouble(boolean[] array) |
static double[] |
convertToDouble(boolean[] array,
double scale) |
static double[] |
convertToDouble(byte[] array) |
static double[] |
convertToDouble(byte[] array,
double scale) |
static double[] |
convertToDouble(float[] array) |
static double[] |
convertToDouble(float[] array,
double scale) |
static double[] |
convertToDouble(int[] array) |
static double[] |
convertToDouble(int[] array,
double scale) |
static double[] |
convertToDouble(long[] array) |
static double[] |
convertToDouble(long[] array,
double scale) |
static double[] |
convertToDouble(short[] array) |
static double[] |
convertToDouble(short[] array,
double scale) |
static double[] |
createArray(double offset,
double scale,
int size)
Creates an array of values x = i * scale + offset
|
static void |
fillArray(boolean[] array,
boolean value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(byte[] array,
byte value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(double[] array,
double value)
fast filling of an array with a default value
initialize a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(double[] array,
int indexStart,
int indexStop,
double value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(float[] array,
float value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(float[] array,
int indexStart,
int indexStop,
float value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(int[] array,
int value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(long[] array,
long value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static void |
fillArray(short[] array,
short value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static <T> void |
fillArray(T[] array,
int indexStart,
int indexStop,
T value)
fast filling of an array with a default value
initialise a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
static <T> void |
fillArray(T[] array,
T value)
fast filling of an array with a default value
initialize a smaller piece of the array and use the System.arraycopy call to fill in the rest of the array in an expanding binary fashion |
public static double[] convertToDouble(boolean[] array)
public static double[] convertToDouble(boolean[] array,
double scale)
public static double[] convertToDouble(byte[] array)
public static double[] convertToDouble(byte[] array,
double scale)
public static double[] convertToDouble(float[] array)
public static double[] convertToDouble(float[] array,
double scale)
public static double[] convertToDouble(int[] array)
public static double[] convertToDouble(int[] array,
double scale)
public static double[] convertToDouble(long[] array)
public static double[] convertToDouble(long[] array,
double scale)
public static double[] convertToDouble(short[] array)
public static double[] convertToDouble(short[] array,
double scale)
public static double[] createArray(double offset,
double scale,
int size)
offset - the offset valuescale - the scale valuesize - the size of the created arraypublic static void fillArray(boolean[] array,
boolean value)
array - input arrayvalue - value to fill each elementpublic static void fillArray(byte[] array,
byte value)
array - input arrayvalue - value to fill each elementpublic static void fillArray(double[] array,
double value)
array - to be initializedvalue - the value for each to be set elementpublic static void fillArray(double[] array,
int indexStart,
int indexStop,
double value)
array - to be initialisedindexStart - the first index to be setindexStop - the last index to be setvalue - the value for each to be set elementpublic static void fillArray(float[] array,
float value)
array - input arrayvalue - value to fill each elementpublic static void fillArray(float[] array,
int indexStart,
int indexStop,
float value)
array - to be initialisedindexStart - the first index to be setindexStop - the last index to be setvalue - the value for each to be set elementpublic static void fillArray(int[] array,
int value)
array - input arrayvalue - value to fill each elementpublic static void fillArray(long[] array,
long value)
array - input arrayvalue - value to fill each elementpublic static void fillArray(short[] array,
short value)
array - input arrayvalue - value to fill each elementpublic static <T> void fillArray(T[] array,
int indexStart,
int indexStop,
T value)
T - element typearray - to be initialisedindexStart - the first index to be setindexStop - the last index to be setvalue - the value for each to be set elementpublic static <T> void fillArray(T[] array,
T value)
T - element typearray - to be initializedvalue - the value for each to be set elementCopyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.