ucl.physiol.neuroconstruct.utils
Class WeightGenerator
java.lang.Object
ucl.physiol.neuroconstruct.utils.NumberGenerator
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
|
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 |
| 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 |
FUNCTION
public static final int FUNCTION
- See Also:
- Constant Field Values
inhomoExpr
public EquationUnit inhomoExpr
somaToSoma
public boolean somaToSoma
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
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)