public class NormDiscrete extends Expression
| Modifier and Type | Field and Description |
|---|---|
protected Attribute |
m_field
The actual attribute itself
|
protected int |
m_fieldIndex
The index of the attribute
|
protected java.lang.String |
m_fieldName
The name of the field to lookup our value in
|
protected java.lang.String |
m_fieldValue
The actual value (as a String) that will correspond to an output of 1
|
protected int |
m_fieldValueIndex
If we are referring to a nominal (rather than String) attribute
then this holds the index of the value in question.
|
protected boolean |
m_mapMissingDefined
True if a replacement for missing values has been specified
|
protected double |
m_mapMissingTo
The value of the missing value replacement (if defined)
|
m_fieldDefs, m_opType| Constructor and Description |
|---|
NormDiscrete(org.w3c.dom.Element normDisc,
FieldMetaInfo.Optype opType,
java.util.ArrayList<Attribute> fieldDefs)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected 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.
|
java.lang.String |
getResultCategorical(double[] incoming)
Always throws an Exception since the result of NormDiscrete must
be continuous.
|
void |
setFieldDefs(java.util.ArrayList<Attribute> fieldDefs)
Set the field definitions for this Expression to use
|
java.lang.String |
toString(java.lang.String pad) |
getExpression, getExpression, getFieldDef, getFieldDefIndex, getOptype, getResultContinuous, toStringprotected java.lang.String m_fieldName
protected Attribute m_field
protected int m_fieldIndex
protected java.lang.String m_fieldValue
protected boolean m_mapMissingDefined
protected double m_mapMissingTo
protected int m_fieldValueIndex
public NormDiscrete(org.w3c.dom.Element normDisc,
FieldMetaInfo.Optype opType,
java.util.ArrayList<Attribute> fieldDefs)
throws java.lang.Exception
normDisc - the Element encapsulating this NormDiscreteopType - the optype for this expression (taken from either the
enclosing DefineFunction or DerivedField)fieldDefs - an ArrayList of Attributes for the fields that this
Expression might need to access
enclosing DefineFunction or DerivedField)java.lang.Exception - if there is a problem parsing this Apply Expressionpublic void setFieldDefs(java.util.ArrayList<Attribute> fieldDefs) throws java.lang.Exception
setFieldDefs in class ExpressionfieldDefs - the field definitions to usejava.lang.Exception - if there is a problem setting the field definitionsprotected Attribute getOutputDef()
getOutputDef in class Expressionpublic double getResult(double[] incoming)
throws java.lang.Exception
getResult in class Expressionincoming - the incoming parameter valuesjava.lang.Exception - if there is a problem computing the resultpublic java.lang.String getResultCategorical(double[] incoming)
throws java.lang.Exception
getResultCategorical in class Expressionincoming - the incoming parameter valuesjava.lang.Exception - alwayspublic java.lang.String toString(java.lang.String pad)
toString in class Expression