public class FieldRef extends Expression
Modifier and Type | Field and Description |
---|---|
protected String |
m_fieldName
The name of the field to reference
|
m_fieldDefs, m_opType
Constructor and Description |
---|
FieldRef(Element fieldRef,
FieldMetaInfo.Optype opType,
ArrayList<Attribute> fieldDefs) |
Modifier and Type | Method and Description |
---|---|
Attribute |
getOutputDef()
Return the structure of the result of applying this Expression
as an Attribute.
|
double |
getResult(double[] incoming)
Get the result of evaluating the expression.
|
String |
getResultCategorical(double[] incoming)
Gets the result of evaluating the expression when the
optype is categorical or ordinal as the actual String
value.
|
void |
setFieldDefs(ArrayList<Attribute> fieldDefs)
Set the field definitions for this Expression to use
|
String |
toString(String pad) |
protected void |
validateField() |
getExpression, getExpression, getFieldDef, getFieldDefIndex, getOptype, getResultContinuous, toString
protected String m_fieldName
public void setFieldDefs(ArrayList<Attribute> fieldDefs) throws Exception
Expression
setFieldDefs
in class Expression
fieldDefs
- the field definitions to useException
- if there is a problem setting the field definitionspublic double getResult(double[] incoming) throws Exception
Expression
getResult
in class Expression
incoming
- the incoming parameter valuesException
- if there is a problem computing the resultpublic String getResultCategorical(double[] incoming) throws Exception
Expression
getResultCategorical
in class Expression
incoming
- the incoming parameter valuesException
- if the optype is continuouspublic Attribute getOutputDef()
getOutputDef
in class Expression
public String toString(String pad)
toString
in class Expression
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.