public class IndiscernibilityCalculator
extends java.lang.Object
SimpleField
,
PairField
or SimilarityField
. To see how indiscernibility for pairs of simple field values is checked,
see PairField.checkDominance
and SimilarityField.checkDominance
methods.Modifier and Type | Field | Description |
---|---|---|
static int |
EXAMPLES_EQUAL |
Result of the
checkIndiscernibility method,
returned when both compared examples have identical values for each checked attribute. |
static int |
EXAMPLES_INCOMPARABLE |
Result of the
checkIndiscernibility method,
returned when examples are discernible. |
Modifier and Type | Method | Description |
---|---|---|
static int |
checkIndiscernibility(int exampleNumber1,
int exampleNumber2,
MemoryContainer memoryContainer) |
Establishes presence or absence of indiscernibility relation between two examples given by numbers.
|
static int |
checkIndiscernibility(int exampleNumber1,
int exampleNumber2,
MemoryContainer memoryContainer,
byte[] attributesMask) |
Establishes presence or absence of indiscernibility relation between two examples given by numbers.
|
public static final int EXAMPLES_EQUAL
checkIndiscernibility
method,
returned when both compared examples have identical values for each checked attribute.public static final int EXAMPLES_INCOMPARABLE
checkIndiscernibility
method,
returned when examples are discernible.public static int checkIndiscernibility(int exampleNumber1, int exampleNumber2, MemoryContainer memoryContainer)
SimpleField
, PairField
or SimilarityField
.
For method details see description of whole class.null
.exampleNumber1
- number of first example to compareexampleNumber2
- number of second example to comparememoryContainer
- reference to memory container both examples belong toEXAMPLES_EQUAL
if both examples have identical values for each checked attributeEXAMPLES_INCOMPARABLE
if examples are discernibleInvalidTypeException
- when type of any active conditional attribute is different than
SimpleField
, PairField
and SimilarityField
java.lang.NullPointerException
- when memory container is null
java.lang.IndexOutOfBoundsException
- when number of first or second example is too small or too big for
given memory containerInvalidValueException
- when memory container contains no attributes or no examplespublic static int checkIndiscernibility(int exampleNumber1, int exampleNumber2, MemoryContainer memoryContainer, byte[] attributesMask)
SimpleField
, PairField
or SimilarityField
.
For method details see description of whole class.checkIndiscernibility(int, int, MemoryContainer)
method - sets temporary mask
for attributes, gets result of checkIndiscernibility(int, int, MemoryContainer)
method
(which uses temporary mask) and finally deletes the mask.exampleNumber1
- number of first example to compareexampleNumber2
- number of second example to comparememoryContainer
- reference to memory container both examples belong toattributesMask
- Mask for attributes, allowing indiscernibility calculations for a subset of active and conditional attributes.
It is checked if length of the mask is equal to the number of attributes in memory container.
If attributesMask(i) is equal to zero,
than corresponding attribute is not taken into account at all when calculating indiscernibility, even if it's active and conditional.
If attributesMask(i) is different than zero,
than corresponding attribute is considered further - it is checked if it's active and conditional.
In fact only mask values corresponding to active and conditional attributes are important. All other values are
not taken into account and may be any.EXAMPLES_EQUAL
if both examples have identical values for each checked attributeEXAMPLES_INCOMPARABLE
if examples are discernibleInvalidTypeException
- when type of any active conditional attribute is different than
SimpleField
, PairField
and SimilarityField
java.lang.NullPointerException
- when memory container is null
java.lang.IndexOutOfBoundsException
- when number of first or second example is too small or too big for
given memory containerInvalidValueException
- when length of given mask is different than number of attributes
in given memory container
or when memory container contains no attributes or no examples