|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.AbleObject | +--com.ibm.able.beans.filter.AbleFilter
This class provides data translation and scaling functions for Able. It is most useful for neural networks that require numeric data between 0 and 1, or -0.5 and +0.5, or for conversion of string data to other values whether they are string or numeric.
This code performs complicated processing of data. Based on the field input and output data types, the code can be processed in a wide variety of ways.
Up to four internal buffers are used:
TmpInSym TmpOutSym Value Input Symbol Output Buffer Buffer TmpInNum TmpOutNum
Field Summary | |
---|---|
static int |
Able_FILT_INVALID_INDEX
|
static int |
Able_FILT_INVALID_NUMERIC_INPUT_INDEX
|
static int |
Able_FILT_INVALID_SYMBOLIC_INPUT_INDEX
|
static int |
Able_FILT_NOTANUMBER
|
static int |
Able_FILT_OPERATOR_ERROR
|
static int |
Able_FILT_READ_IO
|
static int |
Able_FILT_WRITE_IO
|
static int |
ABS
|
static int |
ACOS
|
static int |
ADD
|
static int |
ADDTOEND
|
protected java.lang.Object |
altInputBuffer
"altInputBuffer" is initialized to null, but can be used by other objects to provide input data to this bean's process() synchronous method via an AbleEvent with "process" as the action string and either a String[] or double[] as the argument Object. |
static int |
ASIN
|
static int |
ATAN
|
static int[] |
binCodeOperList
|
static int |
BITAND
|
static int |
BITCOMP
|
static int |
BITOR
|
static int |
BITXOR
|
static int |
CEIL
|
static int |
COS
|
static int |
COSH
|
static java.lang.String |
defaultName
|
static int |
DISCRETIZE
|
static int |
DIV
|
static int |
EXP
|
static int |
EXP10
|
static int |
FLOOR
|
static int |
LOG
|
static int |
LOG10
|
static int |
LOWCASE
|
static int |
MAXUV
|
static int |
MINUV
|
static int |
MODULO
|
static int |
NONE
|
static int |
NORM1
|
static int |
NORM2
|
static int |
NORM3
|
static int[] |
numberOperList
|
static int |
NUMERIC
|
static int |
NUMLOGICALTYPES
|
static int |
NUMOPERATORTYPES
|
static int |
NUMSTATUSSTRINGS
|
static int |
NUMUSAGETYPES
|
static int[] |
oneOfNCodeOperList
|
static int[] |
oneOfNCodePostOperList
|
static int |
POW
|
static int |
POWERN
|
static int |
ROUND
|
static int |
SCALE
|
static int |
SIN
|
static int |
SINH
|
static int |
SQRT
|
static int |
SQUARE
|
static int |
SYMBOLIC
|
static int[] |
symbolOperList
|
static int |
TABLE
|
static int |
TAN
|
static int |
TANH
|
static int[] |
thermCodeOperList
|
static int |
THRESHOLD
|
static int |
TRANSLATE
|
static int |
TRUNC
|
static int[] |
typeList
|
static int |
UPCASE
|
static int[] |
vectorOperList
|
static int |
XBINCODE
|
static int |
XDIALOG
|
static int |
XEDIT
|
static int |
XIGNORE
|
static int |
XINBUFPOS
|
static int |
XINPUT
|
static int |
XNUMBER
|
static int |
XONEOFNCODE
|
static int |
XOUTPUFPOS
|
static int |
XOUTPUT
|
static int |
XSYMBOL
|
static int |
XTHERMCODE
|
static int |
XVECTOR
|
Fields inherited from class com.ibm.able.AbleObject |
---|
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
Constructor Summary | |
---|---|
AbleFilter()
Construct a filter object with default name. |
|
AbleFilter(java.lang.String name)
Construct an AbleFilter object with specified name. |
Method Summary | |
---|---|
void |
addTemplateRec(AbleTranslateTemplate tempRec)
Add a template to the end of the filter. |
void |
addTemplateRecs(java.util.Vector tempRecs)
Add a vector of templates to the end of the filter. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
static void |
generateTranslateTemplates(AbleFilter inFilter,
AbleFilter outFilter,
java.util.Vector fields)
Populate a filter for converting data to a bean's input specifications, and a filter for converting a bean's output specifications back to the original coordinates. |
java.lang.String |
getFieldNames()
Return a list of all of the fields names in the template |
java.lang.String[] |
getFieldNamesArray()
Get the list of field names. |
int |
getNumInFields()
|
int |
getNumInUnits()
|
int |
getNumNumericInUnits()
|
int |
getNumNumericOutUnits()
|
int |
getNumOutFields()
|
int |
getNumOutUnits()
|
int |
getNumSymInUnits()
|
int |
getNumSymOutUnits()
|
java.lang.String[] |
getStatusInfo()
Get status line information. |
java.util.Vector |
getTable()
|
AbleTranslateTemplate |
getTemplateRec(int inx)
|
AbleTranslateTemplate |
getTemplateRec(java.lang.String name)
Return the first field with the matching name, or null if no matching field was found. |
int |
getTotalInUnits()
|
int |
getTotalOutUnits()
|
static java.lang.String[] |
getValidOpers(java.lang.String dataType)
Get a list of valid operators for a given data type. |
java.lang.String[] |
getValidTypes(java.lang.String dataType)
Get a list of valid destination data types for the given source data type. |
java.lang.String |
getVersion()
|
void |
insertTemplateRec(AbleTranslateTemplate tempRec,
int index)
Insert a template record into the filter's Translate Table at the position specified, Insert a template into the filter. |
void |
process()
Process a complete record (every field) from input to output buffer. |
java.lang.Object |
process(java.lang.Object theInputArg)
Perform the main, standard processing function performed by this bean, using the argument Object (usually passed via an AbleEvent). |
void |
removeAllTemplateRecs()
Remove all templates from the filter. |
void |
removeTemplateRec(int index)
Remove the template at the position specified from the filter. |
void |
reset()
Set processing options to default values. |
java.lang.String[] |
testTemplate(int index,
java.lang.String[] inputString)
Perform a test translation for a single template field. |
void |
update()
Update all field buffer position info in the templates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String defaultName
public static final int NUMUSAGETYPES
public static final int NUMLOGICALTYPES
public static final int NUMOPERATORTYPES
public static final int NUMSTATUSSTRINGS
public static final int ADDTOEND
public static final int Able_FILT_OPERATOR_ERROR
public static final int Able_FILT_INVALID_INDEX
public static final int Able_FILT_INVALID_SYMBOLIC_INPUT_INDEX
public static final int Able_FILT_NOTANUMBER
public static final int Able_FILT_INVALID_NUMERIC_INPUT_INDEX
public static final int Able_FILT_READ_IO
public static final int Able_FILT_WRITE_IO
public static final int SYMBOLIC
public static final int NUMERIC
public static final int XINPUT
public static final int XOUTPUT
public static final int XIGNORE
public static final int XEDIT
public static final int XINBUFPOS
public static final int XOUTPUFPOS
public static final int XDIALOG
public static final int XBINCODE
public static final int XNUMBER
public static final int XSYMBOL
public static final int XTHERMCODE
public static final int XONEOFNCODE
public static final int XVECTOR
public static final int ABS
public static final int ACOS
public static final int ASIN
public static final int ATAN
public static final int BITAND
public static final int BITOR
public static final int BITXOR
public static final int CEIL
public static final int COS
public static final int COSH
public static final int DIV
public static final int EXP
public static final int EXP10
public static final int FLOOR
public static final int LOG
public static final int LOG10
public static final int LOWCASE
public static final int MAXUV
public static final int MINUV
public static final int MODULO
public static final int NONE
public static final int NORM1
public static final int NORM2
public static final int NORM3
public static final int ROUND
public static final int SCALE
public static final int SIN
public static final int SINH
public static final int SQRT
public static final int SQUARE
public static final int TABLE
public static final int TAN
public static final int TANH
public static final int THRESHOLD
public static final int TRANSLATE
public static final int TRUNC
public static final int UPCASE
public static final int ADD
public static final int DISCRETIZE
public static final int BITCOMP
public static final int POW
public static final int POWERN
public static final int[] typeList
public static final int[] binCodeOperList
public static final int[] numberOperList
public static final int[] symbolOperList
public static final int[] thermCodeOperList
public static final int[] oneOfNCodeOperList
public static final int[] oneOfNCodePostOperList
public static final int[] vectorOperList
protected java.lang.Object altInputBuffer
Constructor Detail |
public AbleFilter() throws AbleException
public AbleFilter(java.lang.String name) throws AbleException
name
- A String containing the name used to identify this bean.Method Detail |
public static void generateTranslateTemplates(AbleFilter inFilter, AbleFilter outFilter, java.util.Vector fields) throws AbleException
inFilter
- The AbleFilter used to convert incoming data. A null value is not allowed.outFilter
- The AbleFilter used to convert outgoing data. A null value is allowed.fields
- A vector of AbleFields from which to derive the translation template.public void reset() throws AbleException
reset
in class AbleObject
com.ibm.able.AbleObject
AbleException
- If an error occurs.AbleBean.reset()
public java.lang.String getVersion()
public int getTotalInUnits()
public int getTotalOutUnits()
public int getNumInFields()
public int getNumSymInUnits()
public int getNumInUnits()
public int getNumOutFields()
public int getNumSymOutUnits()
public int getNumOutUnits()
public int getNumNumericInUnits()
public int getNumNumericOutUnits()
public java.util.Vector getTable()
public AbleTranslateTemplate getTemplateRec(int inx)
public AbleTranslateTemplate getTemplateRec(java.lang.String name)
public void addTemplateRec(AbleTranslateTemplate tempRec)
template
- The AbleTranslateTemplate template to be added.public void addTemplateRecs(java.util.Vector tempRecs)
template
- A Vector of AbleTranslateTemplates to be added.
public void insertTemplateRec(AbleTranslateTemplate tempRec, int index)
template
- The AbleTranslateTemplate template to be inserted
index
- The position where the template should be inserted
public void removeTemplateRec(int index)
Index
- The index of the template to removepublic void removeAllTemplateRecs()
public java.lang.String getFieldNames()
public java.lang.String[] getFieldNamesArray()
public java.lang.String[] getStatusInfo()
public static java.lang.String[] getValidOpers(java.lang.String dataType)
dataType
- The data type
public java.lang.String[] getValidTypes(java.lang.String dataType)
DataType
- The source data type
public void process() throws AbleException
process
in class AbleObject
com.ibm.able.AbleObject
AbleObject.inputBuffer
,
AbleObject.outputBuffer
,
AbleBean.process()
public java.lang.Object process(java.lang.Object theInputArg) throws AbleException
process
in class AbleObject
theInputArg
- An Object used to initialize the bean.
Note: AbleFilter only accepts Object[], String[], double[] or Vector as
arguments.
public java.lang.String[] testTemplate(int index, java.lang.String[] inputString)
Index
- The index of the template to test
InputString
- A string array containing the test input data
public void update()
public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |