|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.factory.IlrHasher
public final class IlrHasher
The class defines a hasher of the ruleset. A hasher is a way to optimize the join test of a rule by activating an internal hash table. A hasher is composed of a formal variable defining on which class the hasher is applied, a hashing expression, and a set of properties.
The properties are the size of the internal hash table, an accuracy flag to indicate which internal structure should be used, a constant flag indicating whether the hasher class instances are constant or not, and an ordered flag activating the hasher on relation orders. These properties may have an important influence on the performance of the engine.
By default, a hasher is activated only on an equality relation, is not accurate, and not constant.
There are additional constraints on the properties and the hashing expressions. Please refer to the reference manual.
Field Summary | |
---|---|
static int |
DEFAULT_SIZE
|
Constructor Summary | |
---|---|
IlrHasher(IlrVariable formalVariable,
IlrValue hashingExpr)
Builds a hasher given its formal parameter and hashing expression. |
Method Summary | |
---|---|
IlrVariable |
getFormalVariable()
Gets the formal variable of the hasher. |
IlrValue |
getHashingExpression()
Gets the hashing expression of the hasher. |
String |
getIdentifier()
Gets the identifier of the hasher. |
int |
getSize()
Gets the size of the internal hash table. |
boolean |
isAccurate()
Indicates whether the hasher is accurate or not. |
boolean |
isConstant()
Indicates whether the hasher is constant or not. |
boolean |
isOrdered()
Indicates whether the hasher is ordered or not. |
void |
setAccurate(boolean accurate)
Sets the accuracy of the hasher. |
void |
setConstant(boolean constant)
Sets the constant quality of the hasher. |
void |
setOrdered(boolean ordered)
Sets the ordered quality of the hasher. |
void |
setSize(int size)
Sets the size of the internal hash table dedicated to this hasher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_SIZE
Constructor Detail |
---|
public IlrHasher(IlrVariable formalVariable, IlrValue hashingExpr)
formalVariable
- The formal parameter.hashingExpr
- The hashing expression.Method Detail |
---|
public void setAccurate(boolean accurate)
accurate
- true
to set the hasher accuracy property.public void setConstant(boolean constant)
constant
- true
to set the hasher constant property.public void setOrdered(boolean ordered)
ordered
- true
to set the hasher ordered property.public String getIdentifier()
public boolean isAccurate()
true
if accurate.public boolean isConstant()
true
if constant.public boolean isOrdered()
true
if ordered.public void setSize(int size)
size
- The size to be set.public int getSize()
public IlrVariable getFormalVariable()
public IlrValue getHashingExpression()
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |