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 boolean
Flag indicating if condition (in particular, the value set) is adjustable.protected String
Attribute the condition is built upon.protected IValueSet
Value set.Fields inherited from class adaa.analytics.rules.logic.representation.condition.ConditionBase
covering, disabled, type
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates empty condition.ElementaryCondition
(String attribute, IValueSet valueSet) Initializes members. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Verifies whether the condition is equal to another one.Getsattribute
.Gets a collection of attributes the condition is built upon.GetsvalueSet
.int
hashCode()
Calculates object hash code.protected void
internalEvaluate
(IExampleSet set, Set<Integer> outIndices) Evaluates the condition on a specified dataset.protected boolean
Evaluates the condition on a given example.intersect
(ElementaryCondition other) Gets intersection with another elementary condition.boolean
Getsadjustable
.void
setAdjustable
(boolean b) Setsadjustable
.void
setValueSet
(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:
internalEvaluate
in 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:
internalEvaluate
in 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:
equals
in 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:
getAttributes
in classConditionBase
- Returns:
- Set of attributes.
-
clone
- Specified by:
clone
in classConditionBase
-