|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.util.EngineArray
public final class EngineArray
Some array functions used by Encog.
Method Summary | |
---|---|
static double[] |
add(double[] d,
double[] m)
|
static void |
arrayAdd(double[][] target,
double[][] h)
|
static byte[] |
arrayCopy(byte[] input)
Copy a byte array. |
static void |
arrayCopy(byte[] source,
int sourcePos,
byte[] target,
int targetPos,
int length)
|
static double[] |
arrayCopy(double[] input)
Copy a double array. |
static double[][] |
arrayCopy(double[][] source)
Copy a 2D double array. |
static void |
arrayCopy(double[] src,
double[] dst)
Completely copy one array into another. |
static void |
arrayCopy(double[] source,
float[] target)
Copy an array of floats to an array of doubles. |
static void |
arrayCopy(double[] source,
int sourcePos,
double[] target,
int targetPos,
int length)
Copy an array of doubles. |
static void |
arrayCopy(float[] source,
double[] target)
Copy an array of floats to an array of doubles. |
static int[] |
arrayCopy(int[] input)
Copy an int array. |
static void |
arrayCopy(int[] src,
int[] dst)
Completely copy one array into another. |
static void |
arrayCopy(int[] source,
int sourcePos,
int[] target,
int targetPos,
int length)
|
static boolean |
contains(int[] array,
int target)
|
static Double[] |
doubleToObject(double[] array)
Convert an array of double primitives to Double objects. |
static double |
euclideanDistance(double[] p1,
double[] p2)
|
static void |
fill(boolean[] a,
boolean b)
|
static void |
fill(double[][] sigma,
int value)
|
static void |
fill(double[] array,
double value)
Fill a double array. |
static void |
fill(float[] array,
float value)
Fill a float array. |
static void |
fill(int[] a,
int value)
|
static int |
findStringInArray(String[] search,
String searchFor)
Search for a string in an array. |
static int |
indexOfLargest(double[] data)
|
static double[] |
listToDouble(Collection<?> list)
Convert the collection to an array list of doubles. |
static double |
max(double[] weights)
|
static int |
max(int[] data)
|
static int |
maxIndex(double[] data)
|
static int |
maxIndex(int[] data)
|
static double |
mean(double[] data)
|
static double |
mean(int[] data)
|
static double |
min(double[] weights)
|
static int |
min(int[] data)
|
static double[] |
objectToDouble(Double[] array)
Convert an array of Double objects to double primitives. |
static String |
replace(String str,
String searchFor,
String replace)
|
static double |
sdev(int[] data)
|
static double[] |
subtract(double[] a,
double[] b)
|
static double |
vectorProduct(double[] a,
double[] b)
Calculate the product of two vectors (a scalar value). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double[] arrayCopy(double[] input)
input
- The array to copy.
public static byte[] arrayCopy(byte[] input)
input
- The array to copy.
public static void arrayCopy(double[] src, double[] dst)
src
- Source array.dst
- Destination array.public static void arrayCopy(double[] source, float[] target)
source
- The source array.target
- The target array.public static void arrayCopy(double[] source, int sourcePos, double[] target, int targetPos, int length)
source
- The source.sourcePos
- The source index.target
- The target.targetPos
- The target index.length
- The length.public static double[][] arrayCopy(double[][] source)
source
- The source.
public static void arrayCopy(float[] source, double[] target)
source
- The source array.target
- The target array.public static int[] arrayCopy(int[] input)
input
- The array to copy.
public static void arrayCopy(int[] src, int[] dst)
src
- Source array.dst
- Destination array.public static Double[] doubleToObject(double[] array)
array
- The primitive array.
public static void fill(double[] array, double value)
array
- The array to fill.value
- What to fill the array with.public static void fill(float[] array, float value)
array
- The array to fill.value
- What to fill the array with.public static int findStringInArray(String[] search, String searchFor)
search
- Where to search.searchFor
- What we are looking for.
public static double[] listToDouble(Collection<?> list)
list
- The list to convert.
public static double[] objectToDouble(Double[] array)
array
- An array of Double objects.
public static double vectorProduct(double[] a, double[] b)
a
- First vector to multiply.b
- Second vector to multiply.
public static int indexOfLargest(double[] data)
public static double min(double[] weights)
public static double max(double[] weights)
public static boolean contains(int[] array, int target)
public static int maxIndex(double[] data)
public static int maxIndex(int[] data)
public static int max(int[] data)
public static int min(int[] data)
public static double mean(int[] data)
public static double sdev(int[] data)
public static double euclideanDistance(double[] p1, double[] p2)
public static void fill(double[][] sigma, int value)
public static void fill(boolean[] a, boolean b)
public static double[] add(double[] d, double[] m)
public static double[] subtract(double[] a, double[] b)
public static double mean(double[] data)
public static void fill(int[] a, int value)
public static String replace(String str, String searchFor, String replace)
public static void arrayCopy(byte[] source, int sourcePos, byte[] target, int targetPos, int length)
public static void arrayCopy(int[] source, int sourcePos, int[] target, int targetPos, int length)
public static void arrayAdd(double[][] target, double[][] h)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |