|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfunction.BasicScalarFunction
caffeinterface.CaffeToScalarFunction
public abstract class CaffeToScalarFunction
Simplifies the use of CaffeClass for computation. In JAMPOT, the
basic compute functionality is provided by the Computable
interface, its sub-interfaces, and derived classes. While the CAFFE framework
provides a compute method, it typically returns nothing. In addition,
CAFFE facilitates interfacing of legacy code, XML-based input, and data
sharing. This class attempts to bring that functionality, and the resulting
PASS-compatibility, into JAMPOT.
| Field Summary | |
|---|---|
protected caffe.SharedData |
db
|
| Fields inherited from class function.BasicScalarFunction |
|---|
DEFAULT_BOUNDS, DEFAULT_DIM, VALUE_OUTSIDE_BOUNDS |
| Constructor Summary | |
|---|---|
CaffeToScalarFunction()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getComputeVarName()
Returns the name of the variable that holds the computed result in the CAFFE database. |
caffe.CaffeClass |
getMainClass()
Returns the main compute class in the CAFFE application. |
java.lang.String |
getXmlFileName()
Returns the name of the XML file to be used for data input. |
void |
init()
Initialization method. |
protected abstract void |
populateDatabase(double[] x)
Populates the CAFFE database with variable values based on the given vector x. |
double |
quickCompute(double[] x)
Populates the database, runs the compute routine on the main class, and then returns the value of the variable in the database corresponding to the compute-variable name. |
void |
setComputeVarName(java.lang.String computeVarName)
Sets the name of the compute-result variable |
void |
setXmlFileName(java.lang.String xmlFileName)
Sets the name of the XML file to be used for data input |
| Methods inherited from class function.BasicScalarFunction |
|---|
checkDimensions, compute, compute, compute, compute, compute, compute, getBounds, getInputDimension, getOutputDimension, isWithinBounds, makeBounds, quickCompute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected caffe.SharedData db
| Constructor Detail |
|---|
public CaffeToScalarFunction()
| Method Detail |
|---|
public caffe.CaffeClass getMainClass()
public java.lang.String getXmlFileName()
public void setXmlFileName(java.lang.String xmlFileName)
xmlFileName - the name of the XML file for data input.public java.lang.String getComputeVarName()
public void setComputeVarName(java.lang.String computeVarName)
computeVarName - the desired name of the compute-result variable.public void init()
BasicScalarFunction
init in interface ScalarFunctioninit in class BasicScalarFunctionpublic double quickCompute(double[] x)
quickCompute in interface ScalarFunctionquickCompute in class BasicScalarFunctionx - the given input.
BasicScalarFunction.quickCompute(double[])protected abstract void populateDatabase(double[] x)
Computable to the variables in the CAFFE database.
x - the given set of design values.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||