public class OrdinalValue2CardinalValue
extends java.lang.Object
Constructor | Description |
---|---|
OrdinalValue2CardinalValue() |
Sole constructor
|
Modifier and Type | Method | Description |
---|---|---|
void |
addConversionToCriterion(OrdinalCriterionConversion conversion,
int criterionNumber) |
Adds
OrdinalCriterionConversion object to conversion table,
for given criterion.SIC! |
MemoryContainer |
applyTo(MemoryContainer oldMemoryContainer) |
Converts entire memory container by converting every ordinal value of each conditional ordinal criterion
which number is specified in this class.
|
FloatField |
convert(java.lang.String ordinalValue,
int criterionNumber) |
Converts given ordinal value to cardinal value, for given conditional ordinal criterion.
|
public void addConversionToCriterion(OrdinalCriterionConversion conversion, int criterionNumber)
OrdinalCriterionConversion
object to conversion table,
for given criterion.conversion
- cardinal equivalents for all ordinal values of one conditional ordinal criterion
from memory containercriterionNumber
- number of conditional ordinal criterion for which cardinal equivalents of ordinal values
will be rememberedjava.lang.NullPointerException
- when conversion is nullpublic FloatField convert(java.lang.String ordinalValue, int criterionNumber)
ordinalValue
- string with ordinal criterion value that will be convertedcriterionNumber
- index of conditional ordinal criterion for which conversion should be madeValueNotFoundException
- when no conversion information was found for criterion with given number or
when no equivalent cardinal value was found for given ordinal valuepublic MemoryContainer applyTo(MemoryContainer oldMemoryContainer)
FloatField
. File information is not copied to new (returned) memory container.
Old memory container is not affected in any way and new memory container is fully independent from old one.MemoryContainersDescriptions
class, this method automatically creates description of new (returned) memory container and stores it in
MemoryContainersDescriptions
class. When creating MemoryContainerDescription
object
for new (returned) memory container, information about how to convert ordinal values to cardinal values is set
to null
(because this information has just been used here). Information about how to convert differences
of evaluations on conditional cardinal criteria to the degrees of the intensity of preference is copied without
duplicating (reference from old description is set in new description).
Quantities of added minimal values for particular cardinal gain criteria in Lorenz evaluation space are copied
without duplicating (reference from old description is set in new description). Evaluation space and container type
are set to the same values which were stored for old memory container.
Descriptions of the meanings of attributes from new memory container are set to be identical with descriptions
from old memory container (independent copy of AttributesMeaningsDescriptions
object is created).oldMemoryContainer
- memory container to convertjava.lang.NullPointerException
- when old memory container is null,
when new attributes created in this method cannot be set in new (returned)
memory container
or when any of new examples created in this method cannot be added to new (returned) memory container,
which should generally not happen if this method works correctlyInvalidValueException
- when old memory container contains no attributes or no examples
or when any attribute from given memory container for which conversion should be made
is not active, not conditional, not ordinal or has no preference type assignedValueNotFoundException
- when this conversion contains no equivalent cardinal value
for some ordinal value present in given memory container, for some active conditional ordinal criterion