com.marmoush.jann
Class Layer

java.lang.Object
  extended by com.marmoush.jann.Layer
All Implemented Interfaces:
IFillableLayer, ILayer, Serializable
Direct Known Subclasses:
SvLayer

public class Layer
extends Object
implements Serializable, ILayer, IFillableLayer

The Class Layer.

See Also:
Serialized Form

Constructor Summary
Layer()
          Instantiates a new layer.
Layer(int nInputs, int nNeurons, boolean biased)
          Instantiates a new layer.
 
Method Summary
 boolean equals(Object obj)
          Equals.
 DoubleMatrix getBias()
          Gets the bias.
 DoubleMatrix getInput()
          Gets the input.
 DoubleMatrix getNetSum()
          Gets the net sum.
 DoubleMatrix getOutput()
          Gets the output.
 double getTheta()
          Gets the theta.
 ITransfere getTransfereFnctr()
          Gets the transfere fnctr.
 DoubleMatrix getWeight()
          Gets the weight.
 IWeight getWeightFnctr()
          Gets the weight fnctr.
 int hashCode()
          Hash code.
 boolean isBiased()
           
 boolean isInputOnlyLayer()
          Checks if is input only layer.
 void setBias(DoubleMatrix bias)
          Sets the bias.
 void setBiased(boolean biased)
           
 void setFill(double value, DoubleMatrix... matrices)
          Sets the fill.
 void setFillRandom(DoubleMatrix... matrices)
          Sets the fill random.
 void setFillRandomFloor(DoubleMatrix... matrices)
          Sets the fill random floor.
 void setFillRandomMinMax(double min, double max, DoubleMatrix... matrices)
          Sets the fill random min max.
 void setFillRandomMinMaxFloor(int min, int max, DoubleMatrix... matrices)
          Sets the fill random min max floor.
 void setInput(DoubleMatrix input)
          Sets the input.
 void setInputOnlyLayer(boolean inputOnlyLayer)
           
 void setNetSum(DoubleMatrix netsum)
          Sets the net sum.
 void setOutput(DoubleMatrix output)
          Sets the output.
 void setTheta(double theta)
          Sets the theta.
 void setTransfereFnctr(ITransfere transfereFnctr)
          Sets the transfere fnctr.
 void setWeight(DoubleMatrix weight)
          Sets the weight.
 void setWeightFnctr(IWeight weightFnctr)
          Sets the weight fnctr.
 void simulate()
          Simulate.
 String toString()
          To string.
 DoubleMatrix updateNetSum()
          Update net sum.
 DoubleMatrix updateOutput()
          Update output.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Layer

public Layer()
Instantiates a new layer.


Layer

public Layer(int nInputs,
             int nNeurons,
             boolean biased)
Instantiates a new layer.

Parameters:
nInputs - the n inputs
nNeurons - the n neurons
Method Detail

equals

public boolean equals(Object obj)
Description copied from interface: ILayer
Equals.

Specified by:
equals in interface ILayer
Overrides:
equals in class Object
Parameters:
obj - the obj
Returns:
true, if successful

getBias

public DoubleMatrix getBias()
Description copied from interface: ILayer
Gets the bias.

Specified by:
getBias in interface ILayer
Returns:
the bias

getInput

public DoubleMatrix getInput()
Description copied from interface: ILayer
Gets the input.

Specified by:
getInput in interface ILayer
Returns:
the input

getNetSum

public DoubleMatrix getNetSum()
Description copied from interface: ILayer
Gets the net sum.

Specified by:
getNetSum in interface ILayer
Returns:
the net sum

getOutput

public DoubleMatrix getOutput()
Description copied from interface: ILayer
Gets the output.

Specified by:
getOutput in interface ILayer
Returns:
the output

getTheta

public double getTheta()
Description copied from interface: ILayer
Gets the theta.

Specified by:
getTheta in interface ILayer
Returns:
the theta

getTransfereFnctr

public ITransfere getTransfereFnctr()
Description copied from interface: ILayer
Gets the transfere fnctr.

Specified by:
getTransfereFnctr in interface ILayer
Returns:
the transfere fnctr

getWeight

public DoubleMatrix getWeight()
Description copied from interface: ILayer
Gets the weight.

Specified by:
getWeight in interface ILayer
Returns:
the weight

getWeightFnctr

public IWeight getWeightFnctr()
Description copied from interface: ILayer
Gets the weight fnctr.

Specified by:
getWeightFnctr in interface ILayer
Returns:
the weight fnctr

hashCode

public int hashCode()
Description copied from interface: ILayer
Hash code.

Specified by:
hashCode in interface ILayer
Overrides:
hashCode in class Object
Returns:
the int

isBiased

public boolean isBiased()
Specified by:
isBiased in interface ILayer

isInputOnlyLayer

public boolean isInputOnlyLayer()
Description copied from interface: ILayer
Checks if is input only layer.

Specified by:
isInputOnlyLayer in interface ILayer
Returns:
true, if is input only layer

setBias

public void setBias(DoubleMatrix bias)
Description copied from interface: ILayer
Sets the bias.

Specified by:
setBias in interface ILayer
Parameters:
bias - the new bias

setBiased

public void setBiased(boolean biased)

setFill

public void setFill(double value,
                    DoubleMatrix... matrices)
Description copied from interface: IFillableLayer
Sets the fill.

Specified by:
setFill in interface IFillableLayer
Specified by:
setFill in interface ILayer
Parameters:
value - the value
matrices - the matrices

setFillRandom

public void setFillRandom(DoubleMatrix... matrices)
Description copied from interface: IFillableLayer
Sets the fill random.

Specified by:
setFillRandom in interface IFillableLayer
Specified by:
setFillRandom in interface ILayer
Parameters:
matrices - the new fill random

setFillRandomFloor

public void setFillRandomFloor(DoubleMatrix... matrices)
Description copied from interface: IFillableLayer
Sets the fill random floor.

Specified by:
setFillRandomFloor in interface IFillableLayer
Parameters:
matrices - the new fill random floor

setFillRandomMinMax

public void setFillRandomMinMax(double min,
                                double max,
                                DoubleMatrix... matrices)
Description copied from interface: IFillableLayer
Sets the fill random min max.

Specified by:
setFillRandomMinMax in interface IFillableLayer
Parameters:
min - the min
max - the max
matrices - the matrices

setFillRandomMinMaxFloor

public void setFillRandomMinMaxFloor(int min,
                                     int max,
                                     DoubleMatrix... matrices)
Description copied from interface: IFillableLayer
Sets the fill random min max floor.

Specified by:
setFillRandomMinMaxFloor in interface IFillableLayer
Parameters:
min - the min
max - the max
matrices - the matrices

setInput

public void setInput(DoubleMatrix input)
Description copied from interface: ILayer
Sets the input.

Specified by:
setInput in interface ILayer
Parameters:
input - the new input

setInputOnlyLayer

public void setInputOnlyLayer(boolean inputOnlyLayer)

setNetSum

public void setNetSum(DoubleMatrix netsum)
Description copied from interface: ILayer
Sets the net sum.

Specified by:
setNetSum in interface ILayer
Parameters:
netsum - the new net sum

setOutput

public void setOutput(DoubleMatrix output)
Description copied from interface: ILayer
Sets the output.

Specified by:
setOutput in interface ILayer
Parameters:
output - the new output

setTheta

public void setTheta(double theta)
Description copied from interface: ILayer
Sets the theta.

Specified by:
setTheta in interface ILayer
Parameters:
theta - the new theta

setTransfereFnctr

public void setTransfereFnctr(ITransfere transfereFnctr)
Description copied from interface: ILayer
Sets the transfere fnctr.

Specified by:
setTransfereFnctr in interface ILayer
Parameters:
transfereFnctr - the new transfere fnctr

setWeight

public void setWeight(DoubleMatrix weight)
Description copied from interface: ILayer
Sets the weight.

Specified by:
setWeight in interface ILayer
Parameters:
weight - the new weight

setWeightFnctr

public void setWeightFnctr(IWeight weightFnctr)
Description copied from interface: ILayer
Sets the weight fnctr.

Specified by:
setWeightFnctr in interface ILayer
Parameters:
weightFnctr - the new weight fnctr

simulate

public void simulate()
Description copied from interface: ILayer
Simulate.

Specified by:
simulate in interface ILayer

toString

public String toString()
Description copied from interface: ILayer
To string.

Specified by:
toString in interface ILayer
Overrides:
toString in class Object
Returns:
the string

updateNetSum

public DoubleMatrix updateNetSum()
Description copied from interface: ILayer
Update net sum.

Specified by:
updateNetSum in interface ILayer
Returns:
the double matrix

updateOutput

public DoubleMatrix updateOutput()
Description copied from interface: ILayer
Update output.

Specified by:
updateOutput in interface ILayer
Returns:
the double matrix


Copyright © 2011-2012 Marmoush.com. All Rights Reserved.