public class ParamSet extends java.lang.Object implements NamedDoubleSet
Constructor and Description |
---|
ParamSet()
Constructor for ParamSet.
|
ParamSet(NamedDoubleSet values)
Constructor for ParamSet.
|
ParamSet(ParamSet other)
Constructor for ParamSet.
|
ParamSet(java.lang.String[] names)
Generates set of parameters with predefined names.
|
Modifier and Type | Method and Description |
---|---|
ParamSet |
copy()
copy.
|
static ParamSet |
fromAnnotation(Meta cfg)
fromAnnotation.
|
static ParamSet |
fromString(java.lang.String str)
Read parameter set from lines using 'name' = value ± error (lower,upper)
syntax
|
static ParamSet |
fromXML(java.lang.String xml)
fromXML.
|
Param |
getByName(java.lang.String str)
Returns link to parameter with specific name.
|
int |
getDimension() |
double |
getError(java.lang.String str)
getError.
|
java.util.Collection<Param> |
getParams()
Getter for the field
params . |
NamedDoubleArray |
getParErrors(java.lang.String... names)
getParErrors.
|
NamedDoubleArray |
getParValues(java.lang.String... names)
getParValues.
|
ParamSet |
getSubSet(java.lang.String... names)
Returns a parameter set witch consists only of names presented as
parameter (values are also copied).
|
double |
getValue(java.lang.String str)
getValue.
|
double[] |
getValues(java.lang.String... names)
getValues.
|
Names |
names() |
ParamSet |
setPar(Param input)
Searches set for a parameter with the same name and replaces it.
|
ParamSet |
setPar(java.lang.String name,
double value,
double error)
setPar.
|
ParamSet |
setPar(java.lang.String name,
double value,
double error,
java.lang.Double lower,
java.lang.Double upper)
setPar.
|
ParamSet |
setParDomain(java.lang.String name,
java.lang.Double lower,
java.lang.Double upper)
setParDomain.
|
ParamSet |
setParError(java.lang.String name,
double value)
setParError.
|
ParamSet |
setParErrors(NamedDoubleSet errors)
method to set all parameter errors.
|
ParamSet |
setParValue(java.lang.String name,
double value)
setParValue.
|
ParamSet |
setParValues(NamedDoubleSet values)
method to set all parameter values.
|
void |
updateFrom(ParamSet set)
updateFrom.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
namesAsArray
public ParamSet(java.lang.String[] names) throws NameNotFoundException
names
- an array of String
objects.NameNotFoundException
- if any.public ParamSet(ParamSet other)
Constructor for ParamSet.
other
- a ParamSet
object.public ParamSet()
Constructor for ParamSet.
public ParamSet(NamedDoubleSet values)
Constructor for ParamSet.
values
- a NamedDoubleSet
object.@Element(name="param",multiple=true,description="The fit prameter",target="method::hep.dataforge.datafitter.Param.fromAnnotation") @Element(name="params",description="Could be used as a wrapper for \'param\' elements. Used solely on purpose of xml readability.") public static ParamSet fromAnnotation(Meta cfg)
fromAnnotation.
public static ParamSet fromXML(java.lang.String xml) throws java.text.ParseException
fromXML.
xml
- a String
object.ParamSet
object.java.text.ParseException
- if any.public static ParamSet fromString(java.lang.String str)
str
- a String
object.ParamSet
object.public Param getByName(java.lang.String str) throws NameNotFoundException
str
- a String
object.NameNotFoundException
- if any.public int getDimension()
getDimension
in interface NamedSet
public double getError(java.lang.String str) throws NameNotFoundException
getError.
str
- a String
object.NameNotFoundException
- if any.public NamedDoubleArray getParErrors(java.lang.String... names) throws NameNotFoundException
getParErrors.
names
- a String
object.NamedDoubleArray
object.NameNotFoundException
- if any.public NamedDoubleArray getParValues(java.lang.String... names) throws NameNotFoundException
getParValues.
names
- a String
object.NamedDoubleArray
object.NameNotFoundException
- if any.public java.util.Collection<Param> getParams()
Getter for the field params
.
Collection
object.public ParamSet getSubSet(java.lang.String... names) throws NameNotFoundException
names
- a String
object.ParamSet
object.NameNotFoundException
- if any.public double getValue(java.lang.String str) throws NameNotFoundException
getValue.
Метод возвращает значение параметра с именем strgetValue
in interface NamedDoubleSet
str
- NameNotFoundException
public double[] getValues(java.lang.String... names)
getValues.
getValues
in interface NamedDoubleSet
names
- a String
object.public ParamSet setPar(Param input)
copy
to make a deep copy.
In case name not found adds a new parameterpublic ParamSet setPar(java.lang.String name, double value, double error)
setPar.
name
- a String
object.value
- a double.error
- a double.ParamSet
object.public ParamSet setPar(java.lang.String name, double value, double error, java.lang.Double lower, java.lang.Double upper)
setPar.
name
- a String
object.value
- a double.error
- a double.lower
- a Double
object.upper
- a Double
object.ParamSet
object.public ParamSet setParDomain(java.lang.String name, java.lang.Double lower, java.lang.Double upper) throws NameNotFoundException
setParDomain.
name
- a String
object.lower
- a Double
object.upper
- a Double
object.ParamSet
object.NameNotFoundException
- if any.public ParamSet setParError(java.lang.String name, double value) throws NameNotFoundException
setParError.
name
- a String
object.value
- a double.ParamSet
object.NameNotFoundException
- if any.public ParamSet setParErrors(NamedDoubleSet errors) throws NameNotFoundException
errors
- a NamedDoubleSet
object.ParamSet
object.NameNotFoundException
- if any.public ParamSet setParValue(java.lang.String name, double value)
setParValue.
name
- parameter name.value
- a double.ParamSet
object.public ParamSet setParValues(NamedDoubleSet values) throws NameNotFoundException
values
- a NamedDoubleSet
object.ParamSet
object.NameNotFoundException
- if any.public void updateFrom(ParamSet set)
updateFrom.
set
- a ParamSet
object.