Class ConditionBase
java.lang.Object
adaa.analytics.rules.logic.representation.condition.ConditionBase
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
CompoundCondition
,ElementaryCondition
Abstract base class representing all conditions.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IntegerBitSet
Optional integer bit set for storing condition coverage.protected boolean
Flag indicating if condition is disabled.protected ConditionBase.Type
Condition type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ConditionBase
clone()
abstract boolean
Verifies whether the condition is equal to another one.void
evaluate
(IExampleSet set, Set<Integer> outIndices) Evaluates the condition on a specified dataset.boolean
Evaluates the condition on a given example.Gets a collection of attributes the condition is built upon.Getscovering
.getType()
Getstype
protected abstract void
internalEvaluate
(IExampleSet set, Set<Integer> outIndices) Evaluates the condition on a specified dataset.protected abstract boolean
Evaluates the condition on a given example.boolean
Getsdisabled
boolean
Check whether the condition is prunable (non-FORCED and non-PREFERRED).void
Setscovering
.void
setDisabled
(boolean b) Setsdisabled
void
Setstype
-
Field Details
-
disabled
protected boolean disabledFlag indicating if condition is disabled. -
type
Condition type. -
covering
Optional integer bit set for storing condition coverage.
-
-
Constructor Details
-
ConditionBase
public ConditionBase()
-
-
Method Details
-
isDisabled
public boolean isDisabled()Getsdisabled
-
setDisabled
public void setDisabled(boolean b) Setsdisabled
-
getType
Getstype
-
setType
Setstype
-
getCovering
Getscovering
. -
setCovering
Setscovering
. -
isPrunable
public boolean isPrunable()Check whether the condition is prunable (non-FORCED and non-PREFERRED).- Returns:
- Value indicating whether condition is prunable.
-
evaluate
Evaluates the condition on a given example. It verifiesdisabled
flag and callsinternalEvaluate(adaa.analytics.rules.data.row.Example)
abstract method.- Parameters:
ex
- Example to be examined.- Returns:
- Logical value indicating whether the example fulfills the condition.
-
evaluate
Evaluates the condition on a specified dataset. It verifiesdisabled
flag and callsinternalEvaluate(adaa.analytics.rules.data.row.Example)
abstract method.- Parameters:
set
- Input dataset.outIndices
- Output set of indices covered by the condition.
-
equals
Verifies whether the condition is equal to another one. -
getAttributes
Gets a collection of attributes the condition is built upon.- Returns:
- Set of attributes.
-
internalEvaluate
Evaluates the condition on a given example.- Parameters:
ex
- Example to be examined.- Returns:
- Logical value indicating whether the example fulfills the condition.
-
internalEvaluate
Evaluates the condition on a specified dataset.- Parameters:
set
- Input dataset.outIndices
- Output set of indices covered by the condition.
-
clone
-