public class EvaluationDifference2PreferenceIntensityDegree
extends java.lang.Object
Constructor | Description |
---|---|
EvaluationDifference2PreferenceIntensityDegree() |
Sole constructor
|
Modifier and Type | Method | Description |
---|---|---|
void |
addDiscretizationToCriterion(Discretization discretization,
int criterionNumber) |
Adds discretization information for conditional cardinal criterion with given number.
|
boolean |
containsDiscretizationForCriterion(int criterionNumber) |
Gets information if discretization for conditional cardinal criterion with given number is stored
in this class
|
SimpleField |
convert(double evaluationsDifference,
int criterionNumber) |
Converts given difference of evaluations on given conditional cardinal criterion
to the degree of the intensity of preference.
|
SimpleField |
convert(int evaluationsDifference,
int criterionNumber) |
Converts given difference of evaluations on given conditional cardinal criterion
to the degree of the intensity of preference.
|
Discretization |
getDiscretizationForCriterion(int criterionNumber) |
Gets discretization for conditional cardinal criterion with given number.
|
int |
getQuantityOfDiscretizations() |
Gets quantity of discretizations stored in this class.
|
void |
writeDiscretizations(java.lang.String fileName,
Attribute[] attributes) |
Writes discretizations stored in this class to file with given name (path)
|
public EvaluationDifference2PreferenceIntensityDegree()
public void addDiscretizationToCriterion(Discretization discretization, int criterionNumber)
DiscretizationIntervalExt
.
It is checked if given discretization is not empty list of discretization intervals of type
DiscretizationIntervalExt
and if all degrees of the intensity of preference associated with
intervals are of the same subtype of SimpleField
(CardinalField
,
IntegerField
or FloatField
).discretization
- list of discretization intervals for given conditional cardinal criterioncriterionNumber
- number of conditional cardinal criterion for which discretization is storedjava.lang.NullPointerException
- when discretization is nullInvalidTypeException
- when type of any discretization interval is not DiscretizationIntervalExt
or when type of preference intensity degree associated with any extended discretization interval
does not match types of preceding degrees (e.g. degree associated with first interval is of type
IntegerField
while degree associated with second interval is of type FloatField
).InvalidValueException
- when given discretization contains no discretization intervalspublic SimpleField convert(double evaluationsDifference, int criterionNumber)
evaluationsDifference
- difference of evaluations on particular conditional cardinal criterion,
for a pair of examplescriterionNumber
- number of conditional cardinal criterion for which the difference of evaluations
was calculatedValueNotFoundException
- when discretization information for criterion with given number was not found
or when given difference of evaluations on given conditional cardinal criterion
cannot be converted to the degree of the intensity of preference because it does not belong to any
extended discretization interval stored in given criterion's discretizationpublic SimpleField convert(int evaluationsDifference, int criterionNumber)
convert(double, int)
method.evaluationsDifference
- difference of evaluations on particular conditional cardinal criterion,
for a pair of examplescriterionNumber
- number of conditional cardinal criterion for which the difference of evaluations
was calculatedValueNotFoundException
- when discretization information for criterion with given number was not found
or when given difference of evaluations on given conditional cardinal criterion
cannot be converted to the degree of the intensity of preference because it does not belong to any
extended discretization interval stored in given criterion's discretizationpublic boolean containsDiscretizationForCriterion(int criterionNumber)
criterionNumber
- number of conditional cardinal criterion from memory containertrue
if discretization for given conditional cardinal criterion is stored
in this class, false
otherwisepublic Discretization getDiscretizationForCriterion(int criterionNumber)
DiscretizationIntervalExt
objects.criterionNumber
- number of conditional cardinal criterion for which discretization should be getpublic int getQuantityOfDiscretizations()
public void writeDiscretizations(java.lang.String fileName, Attribute[] attributes) throws java.io.IOException
fileName
- name (path) of the file where discretizations stored in this class should be storedattributes
- list of attributes for which this conversion object is validjava.io.IOException
- if file with given name (path) can't be opened for write