The Encog Project

org.encog.neural.activation
Class ActivationUtil

java.lang.Object
  extended by org.encog.neural.activation.ActivationUtil

public final class ActivationUtil
extends java.lang.Object

Utility classes for activation functions. Used to convert a single value to/from an array. This is necessary because the activation functions are designed to operate on arrays, rather than single values.

Author:
jheaton

Method Summary
static double fromArray(double[] d)
          Get a single value from an array.
static double[] toArray(double d)
          Take a single value and create an array that holds it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromArray

public static double fromArray(double[] d)
Get a single value from an array. Return the first element in the array.

Parameters:
d - The array.
Returns:
The first element in the array.

toArray

public static double[] toArray(double d)
Take a single value and create an array that holds it.

Parameters:
d - The single value.
Returns:
The array.

The Encog Project