public class ArrayUtil extends Object
Constructor and Description |
---|
ArrayUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
concatenate(byte[] array1,
byte[] array2,
int len2)
Convenience method to merge two byte arrays.
|
static char[] |
concatenate(char[] array1,
char[] array2,
int len2)
Appends the second array to the first array.
|
static double[] |
concatenate(double[] array1,
double[] array2,
int len2)
Appends the second array to the first array.
|
static char[] |
makeUnique(char[] array)
Returns an array containing the unique characters of the given array.
|
static double[] |
scaleToMax(double[] values)
Scales the given values using the maximum value.
|
static double[] |
scaleValues(double[] values,
double refIntensity)
Scales the values using the reference value.
|
public static char[] concatenate(char[] array1, char[] array2, int len2)
array1
- The first array.array2
- The second array.len2
- The length of the second array to copypublic static double[] concatenate(double[] array1, double[] array2, int len2)
array1
- The first array.array2
- The second array.len2
- The length of the second array to copypublic static byte[] concatenate(byte[] array1, byte[] array2, int len2)
array1
- First byte array.array2
- Second byte array.len2
- The length of the second array to copypublic static char[] makeUnique(char[] array)
array
- the arraypublic static double[] scaleValues(double[] values, double refIntensity)
values
- The values to scale.refIntensity
- The reference value.public static double[] scaleToMax(double[] values)
values
- The values to scale.Copyright © 2021. All rights reserved.