ucl.physiol.neuroconstruct.utils
Class WeightGenerator

java.lang.Object
  extended by ucl.physiol.neuroconstruct.utils.NumberGenerator
      extended by ucl.physiol.neuroconstruct.utils.WeightGenerator
All Implemented Interfaces:
Serializable

public class WeightGenerator
extends NumberGenerator

Generates numbers according to a fixed pattern (see NumberGenerator) or a function of the radius or the soma to soma distance, gived by the user. Any number of these can be generated from a single Weigh Generator

Author:
Padraig Gleeson & Matteo Farinella
See Also:
Serialized Form

Field Summary
static int FUNCTION
           
 EquationUnit inhomoExpr
           
 boolean somaToSoma
           
 
Fields inherited from class ucl.physiol.neuroconstruct.utils.NumberGenerator
distributionType, FIXED_NUM, FLOAT_GENERATOR, GAUSSIAN_NUM, INT_GENERATOR, numberType, RANDOM_NUM
 
Constructor Summary
WeightGenerator()
          Generates a simple WeighGenerator as a simple function of r
WeightGenerator(String expr, boolean soma)
          Generates a simple WeighGenerator with a fixed value of fixedNum
 
Method Summary
 EquationUnit getInhomoExpr()
           
 float getNextNumber(float dist)
           
 float getNominalNumber()
          Generates a nominal value for the number.
 void initialiseAsFunction(String expr, boolean soma)
           
static WeightGenerator initialiseFromNumGenerator(NumberGenerator numGen)
           
 boolean isSomaToSoma()
           
 boolean isTypeFunction()
           
static void main(String[] args)
           
 void setInhomoExpr(EquationUnit inhomoExpr)
           
 void setInhomoExpr(String expr)
           
 void setSomaToSoma(boolean soma)
           
 String toShortString()
          Gives a short representation of the string for textfields, etc.
 String toString()
           
 
Methods inherited from class ucl.physiol.neuroconstruct.utils.NumberGenerator
clone, equals, getDistributionType, getFixedNum, getMax, getMaxPossible, getMean, getMin, getMinPossible, getNextNumber, getNumberType, getStdDev, hashCode, initialiseAsFixedFloatGenerator, initialiseAsFixedIntGenerator, initialiseAsGaussianFloatGenerator, initialiseAsGaussianIntGenerator, initialiseAsRandomFloatGenerator, initialiseAsRandomIntGenerator, isTypeFixedNum, isTypeGaussianNum, isTypeRandomNum, setDistributionType, setFixedNum, setMax, setMean, setMin, setNumberType, setStdDev
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FUNCTION

public static final int FUNCTION
See Also:
Constant Field Values

inhomoExpr

public EquationUnit inhomoExpr

somaToSoma

public boolean somaToSoma
Constructor Detail

WeightGenerator

public WeightGenerator()
Generates a simple WeighGenerator as a simple function of r


WeightGenerator

public WeightGenerator(String expr,
                       boolean soma)
                throws EquationException
Generates a simple WeighGenerator with a fixed value of fixedNum

Throws:
EquationException
Method Detail

getNominalNumber

public float getNominalNumber()
Generates a nominal value for the number. Useful only for giving a rough indication of what the value will be. Will be the function evaluated at 100um, or the evaluation according to NumberGenerator.getNominalNumber()

Overrides:
getNominalNumber in class NumberGenerator

isTypeFunction

public boolean isTypeFunction()

initialiseAsFunction

public void initialiseAsFunction(String expr,
                                 boolean soma)
                          throws EquationException
Throws:
EquationException

initialiseFromNumGenerator

public static WeightGenerator initialiseFromNumGenerator(NumberGenerator numGen)

toString

public String toString()
Overrides:
toString in class NumberGenerator

toShortString

public String toShortString()
Gives a short representation of the string for textfields, etc.

Overrides:
toShortString in class NumberGenerator

getNextNumber

public float getNextNumber(float dist)

main

public static void main(String[] args)

setInhomoExpr

public void setInhomoExpr(EquationUnit inhomoExpr)

getInhomoExpr

public EquationUnit getInhomoExpr()

setInhomoExpr

public void setInhomoExpr(String expr)
                   throws EquationException
Throws:
EquationException

isSomaToSoma

public boolean isSomaToSoma()

setSomaToSoma

public void setSomaToSoma(boolean soma)