|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.omegahat.Numerics.Optimizers.ModelPointNumeric
The basic numeric model point class.
The parameters must implement NumericArray
| Field Summary | |
protected boolean |
evaluated
|
protected NumericArray |
gradient
|
protected NumericMatrix |
hessian
|
protected ModelObjective |
model
|
protected java.lang.String[] |
names
|
protected NumericArray |
parameters
|
protected double |
value
|
| Constructor Summary | |
ModelPointNumeric()
|
|
ModelPointNumeric(NumericArray pars,
NumericArray gradient,
NumericMatrix hessian)
Create a model point initialized to the parameters, gradient and hessian (when one or both of the latter two are not null). |
|
| Method Summary | |
ModelPoint |
copy()
Copy the model point and its numeric properties (parameters, gradient, hessian). |
void |
copyData(ModelPoint theta)
copy in the data from theta. |
void |
copyData(ModelPointNumeric source)
Copy the data from source. |
static NumericArray |
copyDoubles(NumericArray source)
Copy or return null if the argument is null. |
static NumericMatrix |
copyMatrix(NumericMatrix source)
Copy or return null if the argument is null. |
void |
evaluate()
Evaluate the model at the current point, using the model property to define the objective. |
NumericArray |
getGradient()
Accessor for gradient field |
NumericMatrix |
getHessian()
Accessor for hessian field |
ModelObjective |
getModel()
Accessor for model field |
java.lang.String[] |
getNames()
Accessor for names field |
NumericArray |
getParameters()
Accessor for parameters field |
double |
getValue()
Accessor for value field |
boolean |
isEvaluated()
Accessor for evaluated field |
boolean |
setEvaluated(boolean value)
Accessor for setting evaluated field |
NumericArray |
setGradient(NumericArray value)
Accessor for setting gradient field |
NumericMatrix |
setHessian(NumericMatrix value)
Accessor for setting hessian field |
ModelObjective |
setModel(ModelObjective value)
Accessor for setting model field |
java.lang.String[] |
setNames(java.lang.String[] value)
Accessor for setting names field |
NumericArray |
setParameters(NumericArray value)
Accessor for setting parameters field |
double |
setValue(double val)
Accessor for value field |
void |
show()
|
void |
show(java.lang.String header)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected NumericArray parameters
protected double value
protected NumericArray gradient
protected NumericMatrix hessian
protected boolean evaluated
protected java.lang.String[] names
protected ModelObjective model
| Constructor Detail |
public ModelPointNumeric()
public ModelPointNumeric(NumericArray pars,
NumericArray gradient,
NumericMatrix hessian)
These are references: to generate a model point with a copy of the existing values, use the copy method.
| Method Detail |
public NumericArray getParameters()
parameters fieldgetParameters in interface ModelPointNumericIntpublic NumericArray setParameters(NumericArray value)
parameters fieldsetParameters in interface ModelPointNumericIntpublic double getValue()
value fieldgetValue in interface ModelPointNumericIntpublic double setValue(double val)
value fieldsetValue in interface ModelPointNumericIntpublic NumericArray getGradient()
gradient fieldgetGradient in interface ModelPointNumericIntpublic NumericArray setGradient(NumericArray value)
gradient fieldsetGradient in interface ModelPointNumericIntpublic NumericMatrix getHessian()
hessian fieldgetHessian in interface ModelPointNumericIntpublic NumericMatrix setHessian(NumericMatrix value)
hessian fieldsetHessian in interface ModelPointNumericIntpublic boolean isEvaluated()
evaluated fieldisEvaluated in interface ModelPointNumericIntpublic boolean setEvaluated(boolean value)
evaluated fieldsetEvaluated in interface ModelPointNumericIntpublic java.lang.String[] getNames()
names fieldgetNames in interface ModelPointNumericIntpublic java.lang.String[] setNames(java.lang.String[] value)
names fieldsetNames in interface ModelPointNumericIntpublic ModelObjective getModel()
model fieldgetModel in interface ModelPointNumericIntpublic ModelObjective setModel(ModelObjective value)
model fieldsetModel in interface ModelPointNumericIntpublic static NumericArray copyDoubles(NumericArray source)
public static NumericMatrix copyMatrix(NumericMatrix source)
public void copyData(ModelPointNumeric source)
source.If suitable fields (parameters, gradient, hessian) exist in the current object, they are overwritten from the source; if they do not exist or are the wrong size, new fields are allocated.
public void copyData(ModelPoint theta)
theta.
The parameters will be those in theta, as will the
value, gradient, and hessian (either of the latter two can be null).
If allocate is true, the fields will be newly allocated;
otherwise, data will be copied into them if they match in structure the
corresponding fields in theta.
copyData in interface ModelPointpublic void evaluate()
ModelPointNumericIntevaluate in interface ModelPointNumericIntpublic void show(java.lang.String header)
show in interface ModelPointpublic void show()
show in interface ModelPointpublic ModelPoint copy()
ModelPointcopy in interface ModelPoint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||