saaps.ann
Class Data

java.lang.Object
  |
  +--saaps.ann.Data

public class Data
extends java.lang.Object

To run a neural network one must specify the input data and then one receives the output data. This class is the input or output data.

See Also:
DataCreator

Constructor Summary
Data()
          Creates new Input
Data(Data d)
           
Data(double[] d)
           
Data(double[][] d)
          Create a new Data object from an array of an array of double.
Data(int conn, int exam)
          Create a new empty Data object with specified number of connections and examples.
 
Method Summary
 double[][] get()
           
 double get(int conn, int exam)
           
 double[] getConnection(int c)
           
 int getNumOfConnections()
           
 int getNumOfExamples()
           
 void print()
           
 void set(int conn, int exam, double val)
           
 void setConnection(int conn, double[] d)
           
 Data weightedSum(Weights weights)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Data

public Data()
Creates new Input

Data

public Data(int conn,
            int exam)
Create a new empty Data object with specified number of connections and examples.

Each connection represents an input or an output. E.g., for a network with 10 inputs and 3 outputs would need a Data object with 10 connections for its input. The output from the network will be a Data object with 3 connections.

Parameters:
conn - The number of connections
exam - The number of examples

Data

public Data(double[][] d)
Create a new Data object from an array of an array of double.

It is assumed that the first index of the array corresponds to the connections and the second index corresponds to the examples.

Parameters:
d - The data

Data

public Data(double[] d)

Data

public Data(Data d)
Method Detail

getNumOfExamples

public int getNumOfExamples()

getNumOfConnections

public int getNumOfConnections()

get

public double[][] get()

getConnection

public double[] getConnection(int c)

get

public double get(int conn,
                  int exam)

set

public void set(int conn,
                int exam,
                double val)

setConnection

public void setConnection(int conn,
                          double[] d)

weightedSum

public Data weightedSum(Weights weights)

print

public void print()