public class IndiscernibilityGranuleCalculator
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static int[] |
findNumbersOfIndiscernibilityGranuleExamples(int exampleNumber,
MemoryContainer memoryContainer) |
Finds numbers of all examples from indiscernibility granule,
starting at given example, using given reference to memory container.
|
static int[] |
findNumbersOfIndiscernibilityGranuleExamples(int exampleNumber,
MemoryContainer memoryContainer,
byte[] attributesMask) |
Finds numbers of all examples from indiscernibility granule,
starting at given example, using given reference to memory container.
|
public static int[] findNumbersOfIndiscernibilityGranuleExamples(int exampleNumber, MemoryContainer memoryContainer)
exampleNumber
- number of example for which indiscernibility granule should be calculatedmemoryContainer
- reference to memory container containing given examplejava.lang.NullPointerException
- when memory container is null
or when it contains no attributes or no examplesjava.lang.IndexOutOfBoundsException
- when given example number is too small or too big for given memory containerpublic static int[] findNumbersOfIndiscernibilityGranuleExamples(int exampleNumber, MemoryContainer memoryContainer, byte[] attributesMask)
findNumbersOfIndiscernibilityGranuleExamples(int, MemoryContainer)
method -
sets temporary mask for attributes,
gets result of findNumbersOfIndiscernibilityGranuleExamples(int, MemoryContainer)
method
(which uses temporary mask) and finally deletes the mask.exampleNumber
- number of example for which indiscernibility granule should be calculatedmemoryContainer
- reference to memory container containing given exampleattributesMask
- Mask for attributes, allowing indiscernibility granule calculation 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 granule, 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.java.lang.NullPointerException
- when memory container is null
or when it contains no attributes or no examplesjava.lang.IndexOutOfBoundsException
- when given example number is too small or too big for given memory containerInvalidValueException
- when the length of the specified mask is different than the number of attributes
in given memory container