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.ml.data.specific
Class BiPolarNeuralData

    java.lang.Object
      org.encog.ml.data.specific.BiPolarNeuralData

All Implemented Interfaces:
  Serializable, Cloneable, MLData

    public class BiPolarNeuralData

extends Object
implements MLData, Serializable

A NeuralData implementation designed to work with bipolar data. Bipolar data contains two values. True is stored as 1, and false is stored as -1.

Author:
  jheaton
See Also:
  Serialized Form

Constructor Summary
`BiPolarNeuralData(boolean[] d)` Construct this object with the specified data.
`BiPolarNeuralData(int size)` Construct a data object with the specified size.

Method Summary
`void` | `add(int index, double value)` This will throw an error, as "add" is not supported for bipolar.
`void` | `clear()` Set all data to false.
`MLData` | `clone()` Clone this object.
`boolean` | `getBoolean(int i)` Get the specified data item as a boolean.
`double[]` | `getData()` Get the data held by this object as an array of doubles.
`double` | `getData(int index)` Get the data held by the index.
`void` | `setData(double[] theData)` Store the array.
`void` | `setData(int index, boolean value)` Set the specified index of this object as a boolean.
`void` | `setData(int index, double d)` Set the specified index of this object as a double.
`int` | `size()` Get the size of this data object.
`String` | `toString()`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BiPolarNeuralData

    public BiPolarNeuralData(boolean[] d)

  Construct this object with the specified data.

  Parameters:
    `d` - The data to create this object with.

### BiPolarNeuralData

    public BiPolarNeuralData(int size)

  Construct a data object with the specified size.

  Parameters:
    `size` - The size of this data object.

Method Detail

### add

    public final void add(int index,
                          double value)

  This will throw an error, as "add" is not supported for bipolar.

  Specified by:
    `add` in interface `MLData`
  Parameters:
    `index` - Not used.
    `value` - Not used.

### clear

    public final void clear()

  Set all data to false.

  Specified by:
    `clear` in interface `MLData`

### clone

    public final MLData clone()

  Description copied from interface: `MLData`
  Clone this object.

  Specified by:
    `clone` in interface `MLData`
  Overrides:
    `clone` in class `Object`
  Returns:
    A cloned copy of this object.

### getBoolean

    public final boolean getBoolean(int i)

  Get the specified data item as a boolean.

  Parameters:
    `i` - The index to read.
  Returns:
    The specified data item's value.

### getData

    public final double[] getData()

  Get the data held by this object as an array of doubles.

  Specified by:
    `getData` in interface `MLData`
  Returns:
    The data held by this object.

### getData

    public final double getData(int index)

  Get the data held by the index.

  Specified by:
    `getData` in interface `MLData`
  Parameters:
    `index` - The index to read.
  Returns:
    Return the data held at the specified index.

### setData

    public final void setData(double[] theData)

  Store the array.

  Specified by:
    `setData` in interface `MLData`
  Parameters:
    `theData` - The data to store.

### setData

    public final void setData(int index,
                              boolean value)

  Set the specified index of this object as a boolean. This value will be converted into bipolar.

  Parameters:
    `index` - The index to set.
    `value` - The value to set.

### setData

    public final void setData(int index,
                              double d)

  Set the specified index of this object as a double. This value will be converted into bipolar.

  Specified by:
    `setData` in interface `MLData`
  Parameters:
    `index` - The index to set.
    `d` - The value to set.

### size

    public final int size()

  Get the size of this data object.

  Specified by:
    `size` in interface `MLData`
  Returns:
    The size of this data object.

### toString

    public final String toString()

  Overrides:
    `toString` in class `Object`

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.