Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.util
Class EngineArray

    java.lang.Object
      org.encog.util.EngineArray

    public final class EngineArray

extends Object

Some array functions used by Encog.

Method Summary
`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 boolean` | `contains(int[] array, int target)`
`static Double[]` | `doubleToObject(double[] array)` Convert an array of double primitives to Double objects.
`static void` | `fill(double[] array, double value)` Fill a double array.
`static void` | `fill(float[] array, float value)` Fill a float array.
`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(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 double` | `sdev(int[] data)`
`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

### arrayCopy

    public static double[] arrayCopy(double[] input)

  Copy a double array.

  Parameters:
    `input` - The array to copy.
  Returns:
    The result of the copy.

### arrayCopy

    public static void arrayCopy(double[] src,
                                 double[] dst)

  Completely copy one array into another.

  Parameters:
    `src` - Source array.
    `dst` - Destination array.

### arrayCopy

    public static void arrayCopy(double[] source,
                                 float[] target)

  Copy an array of floats to an array of doubles.

  Parameters:
    `source` - The source array.
    `target` - The target array.

### arrayCopy

    public static void arrayCopy(double[] source,
                                 int sourcePos,
                                 double[] target,
                                 int targetPos,
                                 int length)

  Copy an array of doubles.

  Parameters:
    `source` - The source.
    `sourcePos` - The source index.
    `target` - The target.
    `targetPos` - The target index.
    `length` - The length.

### arrayCopy

    public static double[][] arrayCopy(double[][] source)

  Copy a 2D double array.

  Parameters:
    `source` - The source.
  Returns:
    The copied array.

### arrayCopy

    public static void arrayCopy(float[] source,
                                 double[] target)

  Copy an array of floats to an array of doubles.

  Parameters:
    `source` - The source array.
    `target` - The target array.

### arrayCopy

    public static int[] arrayCopy(int[] input)

  Copy an int array.

  Parameters:
    `input` - The array to copy.
  Returns:
    The result of the copy.

### arrayCopy

    public static void arrayCopy(int[] src,
                                 int[] dst)

  Completely copy one array into another.

  Parameters:
    `src` - Source array.
    `dst` - Destination array.

### doubleToObject

    public static Double[] doubleToObject(double[] array)

  Convert an array of double primitives to Double objects.

  Parameters:
    `array` - The primitive array.
  Returns:
    The object array.

### fill

    public static void fill(double[] array,
                            double value)

  Fill a double array.

  Parameters:
    `array` - The array to fill.
    `value` - What to fill the array with.

### fill

    public static void fill(float[] array,
                            float value)

  Fill a float array.

  Parameters:
    `array` - The array to fill.
    `value` - What to fill the array with.

### findStringInArray

    public static int findStringInArray(String[] search,
                                        String searchFor)

  Search for a string in an array.

  Parameters:
    `search` - Where to search.
    `searchFor` - What we are looking for.
  Returns:
    The index that the string occurs at.

### listToDouble

    public static double[] listToDouble(Collection<?> list)

  Convert the collection to an array list of doubles.

  Parameters:
    `list` - The list to convert.
  Returns:
    The array of doubles.

### objectToDouble

    public static double[] objectToDouble(Double[] array)

  Convert an array of Double objects to double primitives.

  Parameters:
    `array` - An array of Double objects.
  Returns:
    An array of double primitives.

### vectorProduct

    public static double vectorProduct(double[] a,
                                       double[] b)

  Calculate the product of two vectors (a scalar value).

  Parameters:
    `a` - First vector to multiply.
    `b` - Second vector to multiply.
  Returns:
    The product of the two vectors (a scalar value).

### indexOfLargest

    public static int indexOfLargest(double[] data)

### min

    public static double min(double[] weights)

### max

    public static double max(double[] weights)

### contains

    public static boolean contains(int[] array,
                                   int target)

### maxIndex

    public static int maxIndex(double[] data)

### maxIndex

    public static int maxIndex(int[] data)

### max

    public static int max(int[] data)

### min

    public static int min(int[] data)

### mean

    public static double mean(int[] data)

### sdev

    public static double sdev(int[] data)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.