thetaNeuron.lib
Class ThetaNeuron

java.lang.Object
  extended by thetaNeuron.lib.ThetaNeuron
All Implemented Interfaces:
ThetaInterface

public class ThetaNeuron
extends java.lang.Object
implements ThetaInterface


Nested Class Summary
static class ThetaNeuron.Method
          Simulation Method Enum.
 
Constructor Summary
ThetaNeuron()
          Theta Neuron Constructor.
ThetaNeuron(int new_num_inputs)
          Theta Neuron Constructor.
ThetaNeuron(int new_num_inputs, double weight_ini)
          Theta Neuron Constructor.
ThetaNeuron(int new_num_inputs, double weight_ini, double new_io)
          Theta Neuron Constructor.
 
Method Summary
 double getIo()
          Public Method to Get the Baseline Current, Io
 ThetaNeuron.Method getMethod()
          Public Method to Get the Neuron Simulation Method
 double getPhase()
          Public Method to Get the Neuron Phase (State)
 double getWeight(int index)
          Public Method to Get the Weight at input neuron index
 java.util.ArrayList runThetaNeuron(double[] ti)
          Public Method to Return Output Spike Times, ts, of a maximum length MAX_NUM_OUTPUT_SPIKES, with input spike times in array ti
 java.util.ArrayList runThetaNeuron(double[] ti, int max_num_ts)
          Public Method to Return Output Spike Times, ts, of a maximum length max_num_ts, with input spike times in array ti
 void setIo(double new_io)
          Public Method to Set the Baseline Current, Io
 void setMethod(ThetaNeuron.Method new_method)
          Public Method to Set the Neuron Simulation Method
 void setVerbose(boolean new_verbose)
          Public Method to Set the Verbosity of the Theta Neuron Simulation
 void setWeight(double new_weight, int index)
          Public Method to Set the Weight at input neuron index to new_weight
 java.lang.String toString()
          Public Method to Convert Theta Neuron into a Property String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThetaNeuron

public ThetaNeuron(int new_num_inputs,
                   double weight_ini,
                   double new_io)
Theta Neuron Constructor. The theta neuron constructor takes three inputs, the number of neuron inputs, the initial weight and the baseline current. In this implementation, new_io must be negative, with typical values of -0.0001 < io < -0.1. If an attempt is made to assign io to a non-negative value then io reverts to the default value of -0.001. If weight_ini is specified as > 100, then the weights are randomized with a uniform distribution between -1 and 1. Otherwise, weight_ini is used as the initial value for all weights Other neuron properties are also assigned here and may be subsequently change using the get/set functions. Specifically, verbose is set to 1 meaning additional information will be displayed to the console during simulation, and method is set to Numerical, meaning numerical intergation will be used by default in the simulation.

Parameters:
new_num_inputs - The number of input neurons desired.
weight_ini - The value to initialize all weights to.
new_io - The baseline current.

ThetaNeuron

public ThetaNeuron(int new_num_inputs,
                   double weight_ini)
Theta Neuron Constructor. The theta neuron constructor takes two inputs, the number of neuron inputs and the initial weight. io, the baseline current is to the default value of -0.001. If weight_ini is specified as > 100, then the weights are randomized with a uniform distribution between -1 and 1. Otherwise, weight_ini is used as the initial value for all weights Other neuron properties are also assigned here and may be subsequently change using the get/set functions. Specifically, verbose is set to 1 meaning additional information will be displayed to the console during simulation, and method is set to Numerical, meaning numerical intergation will be used by default in the simulation.

Parameters:
new_num_inputs - The number of input neurons desired.
weight_ini - The value to initialize all weights to.

ThetaNeuron

public ThetaNeuron(int new_num_inputs)
Theta Neuron Constructor. The theta neuron constructor takes one input, the number of neuron inputs. io, the baseline current is to the default value of -0.001. The intial weights are randomized with a uniform distribution between -1 and 1. Other neuron properties are also assigned here and may be subsequently change using the get/set functions. Specifically, verbose is set to 1 meaning additional information will be displayed to the console during simulation, and method is set to Numerical, meaning numerical intergation will be used by default in the simulation.

Parameters:
new_num_inputs - The number of input neurons desired.

ThetaNeuron

public ThetaNeuron()
Theta Neuron Constructor. The theta neuron constructor no inputs. io, the baseline current is to the default value of -0.001. The intial weights are randomized with a uniform distribution between -1 and 1. A default of 3 input neurons is used. Other neuron properties are also assigned here and may be subsequently change using the get/set functions. Specifically, verbose is set to 1 meaning additional information will be displayed to the console during simulation, and method is set to Numerical, meaning numerical intergation will be used by default in the simulation.

Method Detail

getPhase

public double getPhase()
Public Method to Get the Neuron Phase (State)

Specified by:
getPhase in interface ThetaInterface
Returns:
The neuron phase
See Also:
ThetaNeuron()

getMethod

public ThetaNeuron.Method getMethod()
Public Method to Get the Neuron Simulation Method

Specified by:
getMethod in interface ThetaInterface
Returns:
The neuron simulation method
See Also:
ThetaNeuron()

setMethod

public void setMethod(ThetaNeuron.Method new_method)
Public Method to Set the Neuron Simulation Method

Specified by:
setMethod in interface ThetaInterface
Parameters:
new_method - An enumerator of type Method representing the new simulation method
See Also:
ThetaNeuron()

setVerbose

public void setVerbose(boolean new_verbose)
Public Method to Set the Verbosity of the Theta Neuron Simulation

Specified by:
setVerbose in interface ThetaInterface
Parameters:
new_verbose - A boolean flag representing whether verbose comments should be printed to the console window during simulation
See Also:
ThetaNeuron()

getWeight

public double getWeight(int index)
Public Method to Get the Weight at input neuron index

Specified by:
getWeight in interface ThetaInterface
Parameters:
index - Index into the neuron's inputs from which to get the weight value; must not be greater than the number of inputs or -1 will be returned
Returns:
The weight at input neuronindex
See Also:
ThetaNeuron()

setWeight

public void setWeight(double new_weight,
                      int index)
Public Method to Set the Weight at input neuron index to new_weight

Specified by:
setWeight in interface ThetaInterface
Parameters:
new_weight - New weight value
index - Index into neuron's inputs at which to set the new weight; must not be greater than the number of inputs or weight will not be set
See Also:
ThetaNeuron()

getIo

public double getIo()
Public Method to Get the Baseline Current, Io

Specified by:
getIo in interface ThetaInterface
Returns:
The baseline current, Io
See Also:
ThetaNeuron()

setIo

public void setIo(double new_io)
Public Method to Set the Baseline Current, Io

Specified by:
setIo in interface ThetaInterface
Parameters:
new_io - New baseline current value, must be negative or baseline current will not be set
See Also:
ThetaNeuron()

toString

public java.lang.String toString()
Public Method to Convert Theta Neuron into a Property String

Specified by:
toString in interface ThetaInterface
Overrides:
toString in class java.lang.Object
Returns:
String
See Also:
ThetaNeuron()

runThetaNeuron

public java.util.ArrayList runThetaNeuron(double[] ti)
Public Method to Return Output Spike Times, ts, of a maximum length MAX_NUM_OUTPUT_SPIKES, with input spike times in array ti

Specified by:
runThetaNeuron in interface ThetaInterface
Parameters:
ti - an array of input spike times.
Returns:
A double array list filled in with output spike times.
See Also:
ThetaNeuron()

runThetaNeuron

public java.util.ArrayList runThetaNeuron(double[] ti,
                                          int max_num_ts)
Public Method to Return Output Spike Times, ts, of a maximum length max_num_ts, with input spike times in array ti

Specified by:
runThetaNeuron in interface ThetaInterface
Parameters:
ti - an array of input spike times.
max_num_ts - the maximum number of output spikes that will be returned.
Returns:
A double array list filled in with output spike times.
See Also:
ThetaNeuron()