Class ElementaryCondition
java.lang.Object
adaa.analytics.rules.logic.representation.condition.ConditionBase
adaa.analytics.rules.logic.representation.condition.ElementaryCondition
- All Implemented Interfaces:
Serializable,Cloneable
Represents an elementary condition (built upon single attribute and value set).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class adaa.analytics.rules.logic.representation.condition.ConditionBase
ConditionBase.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanFlag indicating if condition (in particular, the value set) is adjustable.protected StringAttribute the condition is built upon.protected IValueSetValue set.Fields inherited from class adaa.analytics.rules.logic.representation.condition.ConditionBase
covering, disabled, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates empty condition.ElementaryCondition(String attribute, IValueSet valueSet) Initializes members. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanVerifies whether the condition is equal to another one.Getsattribute.Gets a collection of attributes the condition is built upon.GetsvalueSet.inthashCode()Calculates object hash code.protected voidinternalEvaluate(IExampleSet set, Set<Integer> outIndices) Evaluates the condition on a specified dataset.protected booleanEvaluates the condition on a given example.intersect(ElementaryCondition other) Gets intersection with another elementary condition.booleanGetsadjustable.voidsetAdjustable(boolean b) Setsadjustable.voidsetValueSet(IValueSet vs) SetsvalueSet.toString()Generates a text representation of the condition.Methods inherited from class adaa.analytics.rules.logic.representation.condition.ConditionBase
evaluate, evaluate, getCovering, getType, isDisabled, isPrunable, setCovering, setDisabled, setType
-
Field Details
-
attribute
Attribute the condition is built upon. -
valueSet
Value set. -
adjustable
protected boolean adjustableFlag indicating if condition (in particular, the value set) is adjustable.
-
-
Constructor Details
-
ElementaryCondition
protected ElementaryCondition()Creates empty condition. -
ElementaryCondition
Initializes members.- Parameters:
attribute- Attribute.valueSet- Value set.
-
-
Method Details
-
getAttribute
Getsattribute. -
getValueSet
GetsvalueSet. -
setValueSet
SetsvalueSet. -
isAdjustable
public boolean isAdjustable()Getsadjustable. -
setAdjustable
public void setAdjustable(boolean b) Setsadjustable. -
internalEvaluate
Evaluates the condition on a given example.- Specified by:
internalEvaluatein classConditionBase- Parameters:
ex- Example to be examined.- Returns:
- Logical value indicating whether the example fulfills the condition.
-
internalEvaluate
Evaluates the condition on a specified dataset.- Specified by:
internalEvaluatein classConditionBase- Parameters:
set- Input dataset.outIndices- Output set of indices covered by the condition.
-
toString
Generates a text representation of the condition. -
equals
Verifies whether the condition is equal to another one.- Specified by:
equalsin classConditionBase- Parameters:
obj- Reference object.- Returns:
- Logical value indicating whether conditions are equal.
-
intersect
Gets intersection with another elementary condition.- Parameters:
other- Another condition.- Returns:
- New elementary condition.
-
hashCode
public int hashCode()Calculates object hash code. -
getAttributes
Gets a collection of attributes the condition is built upon.- Specified by:
getAttributesin classConditionBase- Returns:
- Set of attributes.
-
clone
- Specified by:
clonein classConditionBase
-