public class ParameterFactoryByType extends Object implements ParameterFactory
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static interface |
ParameterFactoryByType.Correlation<C,T>
Correlates two parameter values.
|
Constructor and Description |
---|
ParameterFactoryByType() |
Modifier and Type | Method and Description |
---|---|
<C,T> void |
addCorrelation(GTUType gtuType,
ParameterType<C> first,
ParameterType<T> then,
ParameterFactoryByType.Correlation<C,T> correlation)
Correlates one parameter to another.
|
<C,T> void |
addCorrelation(ParameterType<C> first,
ParameterType<T> then,
ParameterFactoryByType.Correlation<C,T> correlation)
Correlates one parameter to another for all GTU types.
|
void |
addParameter(GTUType gtuType,
ParameterType<Double> parameterType,
DistContinuous distribution) |
void |
addParameter(GTUType gtuType,
ParameterType<Integer> parameterType,
DistDiscrete distribution) |
<T> void |
addParameter(GTUType gtuType,
ParameterType<T> parameterType,
T value) |
<U extends Unit<U>,T extends AbstractDoubleScalarRel<U,T>> |
addParameter(GTUType gtuType,
ParameterTypeNumeric<T> parameterType,
ContinuousDistDoubleScalar.Rel<T,U> distribution) |
<T> void |
addParameter(ParameterType<T> parameterType,
T value)
Add parameter for all GTU types.
|
void |
addParameter(ParameterTypeDouble parameterType,
DistContinuous distribution)
Add parameter for all GTU types.
|
void |
addParameter(ParameterTypeDouble parameterType,
double value)
Add parameter for all GTU types.
|
<U extends Unit<U>,T extends AbstractDoubleScalarRel<U,T>> |
addParameter(ParameterTypeNumeric<T> parameterType,
ContinuousDistDoubleScalar.Rel<T,U> distribution)
Add parameter for all GTU types.
|
void |
setValues(Parameters parameters,
GTUType gtuType)
Creates a set of parameters for the provided GTU type.
|
String |
toString() |
public void setValues(Parameters parameters, GTUType gtuType) throws ParameterException
setValues
in interface ParameterFactory
parameters
- Parameters; parametersgtuType
- GTUType; GTU typeParameterException
- when illegal parameter value is setpublic <T> void addParameter(GTUType gtuType, ParameterType<T> parameterType, T value)
T
- parameter value typegtuType
- GTUType; the gtu typeparameterType
- ParameterType<T>; the parameter typevalue
- T; the value of the parameterpublic <U extends Unit<U>,T extends AbstractDoubleScalarRel<U,T>> void addParameter(GTUType gtuType, ParameterTypeNumeric<T> parameterType, ContinuousDistDoubleScalar.Rel<T,U> distribution)
U
- unit typeT
- parameter value typegtuType
- GTUType; the gtu typeparameterType
- ParameterTypeNumeric<T>; the parameter typedistribution
- ContinuousDistDoubleScalar.Rel<T,U>; the distribution of the parameterpublic void addParameter(GTUType gtuType, ParameterType<Integer> parameterType, DistDiscrete distribution)
gtuType
- GTUType; the gtu typeparameterType
- ParameterTypeInteger; the parameter typedistribution
- DistDiscrete; the distribution of the parameterpublic void addParameter(GTUType gtuType, ParameterType<Double> parameterType, DistContinuous distribution)
gtuType
- GTUType; the gtu typeparameterType
- ParameterTypeDouble; the parameter typedistribution
- DistContinuous; the distribution of the parameterpublic <T> void addParameter(ParameterType<T> parameterType, T value)
T
- typeparameterType
- ParameterType<T>; the parameter typevalue
- T; the value of the parameterpublic void addParameter(ParameterTypeDouble parameterType, double value)
parameterType
- ParameterTypeDouble; the parameter typevalue
- double; the value of the parameterpublic <U extends Unit<U>,T extends AbstractDoubleScalarRel<U,T>> void addParameter(ParameterTypeNumeric<T> parameterType, ContinuousDistDoubleScalar.Rel<T,U> distribution)
U
- unit typeT
- parameter value typeparameterType
- ParameterTypeNumeric<T>; the parameter typedistribution
- ContinuousDistDoubleScalar.Rel<T,U>; the distribution of the parameterpublic void addParameter(ParameterTypeDouble parameterType, DistContinuous distribution)
parameterType
- ParameterTypeDouble; the parameter typedistribution
- DistContinuous; the distribution of the parameterpublic <C,T> void addCorrelation(GTUType gtuType, ParameterType<C> first, ParameterType<T> then, ParameterFactoryByType.Correlation<C,T> correlation)
null
, in which case the parameter can be
correlated to an external source.C
- parameter value type of first parameterT
- parameter value type of then parametergtuType
- GTUType; GTU typefirst
- ParameterType<C>; independent parameterthen
- ParameterType<T>; dependent parametercorrelation
- Correlation<C, T>; correlationpublic <C,T> void addCorrelation(ParameterType<C> first, ParameterType<T> then, ParameterFactoryByType.Correlation<C,T> correlation)
C
- parameter value type of first parameterT
- parameter value type of then parameterfirst
- ParameterType<C>; independent parameterthen
- ParameterType<T>; dependent parametercorrelation
- Correlation<C, T>; correlationCopyright © 2014–2019 Delft University of Technology. All rights reserved.