|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sri.emo.controller.DecisionMatrix
public class DecisionMatrix
Class that allows for execution of the decision matrix. It pre-parses the database objects so that when getDecision() is called, it is much faster.
Performance Note: Working with the Decision Matrix is not a simple task since very few things are constant. Picking a result from a decision matrix requires a lot of set manipulation or database reads. For performance, this implementation goes with high memory usage and few database reads. CPU-wise, it is an O(n^2) algorithm, so it may not scale over large models.
Memory optimization is possible, but has been not performed for construction speed's sake at this point in time.
Constructor Summary | |
---|---|
DecisionMatrix(int wizardId)
Constructor that takes a wizard id as an argument. |
|
DecisionMatrix(String wizardId)
Constructor that takes a wizard id as an argument. |
Method Summary | |
---|---|
WizDecisionSet |
getDecision(Map decisionRow)
Retrieves the decision. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DecisionMatrix(String wizardId) throws DBException
allItems
map.
wizardId
- the wizard id.
DBException
- upon database error.public DecisionMatrix(int wizardId) throws DBException
allItems
map.
wizardId
- int the wizard id.
DBException
- upon database error.Method Detail |
---|
public WizDecisionSet getDecision(Map decisionRow) throws DBException
decisionRow
- Map that has a key of the Wizard Step Id (as Integer),
and the value as the picked key value from the picklist (or attribute). (Also
as Integer)
DBException
- upon database access error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |