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.
|
<T extends DoubleScalarInterface> |
addParameter(GTUType gtuType,
ParameterType<T> parameterType,
T value) |
void |
addParameter(GTUType gtuType,
ParameterTypeDouble parameterType,
DistContinuous distribution) |
void |
addParameter(GTUType gtuType,
ParameterTypeDouble parameterType,
double value) |
<U extends Unit<U>,T extends AbstractDoubleScalarRel<U,T>> |
addParameter(GTUType gtuType,
ParameterTypeNumeric<T> parameterType,
ContinuousDistDoubleScalar.Rel<T,U> distribution) |
<T extends DoubleScalarInterface> |
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)
setValues in interface ParameterFactoryparameters - Parameters; parametersgtuType - GTUType; GTU typepublic <T extends DoubleScalarInterface> 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 void addParameter(GTUType gtuType, ParameterTypeDouble parameterType, double value)
gtuType - GTUType; the gtu typeparameterType - ParameterTypeDouble; the parameter typevalue - double; 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, ParameterTypeDouble parameterType, DistContinuous distribution)
gtuType - GTUType; the gtu typeparameterType - ParameterTypeDouble; the parameter typedistribution - DistContinuous; the distribution of the parameterpublic <T extends DoubleScalarInterface> 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.