public class SScPairwiseComparisons
extends java.lang.Object
OUTRANKING
, NONOUTRANKING
. Each pair of objects may be assigned to only one of the considered relations.Modifier and Type | Field | Description |
---|---|---|
static int |
NONOUTRANKING |
Constant indicating non-outranking relation
|
static int |
OUTRANKING |
Constant indicating outranking relation
|
static int |
UNDEFINED |
Constant indicating undefined binary relation
|
Constructor | Description |
---|---|
SScPairwiseComparisons() |
Sole constructor
|
SScPairwiseComparisons(PairOfIndices[] pairs,
java.lang.Double[] preferences) |
Constructs pairwise comparisons for given pairs of objects and given assignments of these pairs of objects to outranking/non-outranking relations.
|
SScPairwiseComparisons(SimpleRanking ranking) |
Converts given simple ranking to a set of pairwise comparisons stored in this object.
|
Modifier and Type | Method | Description |
---|---|---|
PairOfIndices[] |
getRelation(int relation) |
Get pairs of objects' indices for pairs of objects belonging to the given relation.
|
int |
getRelationOfPairOfObjects(int indexOfFirstObject,
int indexOfSecondObject) |
Gets relation for ordered pair of objects with given indices.
|
void |
removePairwiseComparison(int indexOfFirstObject,
int indexOfSecondObject) |
Removes pair of objects with given indices from the relation it belongs to.
|
int |
size() |
Gets the number of pairwise comparisons stored in this object
|
int |
sizeS() |
Gets the number of pairs in outranking relation
|
int |
sizeSc() |
Gets the number of pairs in non-outranking relation
|
void |
storePairwiseComparison(int indexOfFirstObject,
int indexOfSecondObject,
int relation) |
Puts ordered pair of objects with given indices into given relation.
|
public static final int OUTRANKING
public static final int NONOUTRANKING
public static final int UNDEFINED
public SScPairwiseComparisons()
public SScPairwiseComparisons(SimpleRanking ranking)
ranking
- simple ranking to convertpublic SScPairwiseComparisons(PairOfIndices[] pairs, java.lang.Double[] preferences)
pairs
- pairs of objects' indicespreferences
- comprehensive preference relations for subsequent pairs of objectsInvalidValueException
- when any comprehensive preference relation is neither InformationTable2PCTConverter.comprehensiveWeakPreferenceGrade
nor InformationTable2PCTConverter.comprehensiveNotWeakPreferenceGrade
public void storePairwiseComparison(int indexOfFirstObject, int indexOfSecondObject, int relation)
indexOfFirstObject
- index of the first object in an ordered pair of objectsindexOfSecondObject
- index of the second object in an ordered pair of objectsrelation
- Target relation. Can be one of OUTRANKING
or NONOUTRANKING
.InvalidValueException
- when any of the given object's indices is smaller than zero
or when given relation is none of OUTRANKING
and NONOUTRANKING
public int getRelationOfPairOfObjects(int indexOfFirstObject, int indexOfSecondObject)
indexOfFirstObject
- index of the first object in an ordered pair of objectsindexOfSecondObject
- index of the second object in an ordered pair of objectsOUTRANKING
or NONOUTRANKING
.
Otherwise, returns UNDEFINED
.InvalidValueException
- when any of the given object's indices is smaller than zeropublic PairOfIndices[] getRelation(int relation)
relation
- relation in questionpublic void removePairwiseComparison(int indexOfFirstObject, int indexOfSecondObject)
indexOfFirstObject
- index of the first object in an ordered pair of objectsindexOfSecondObject
- index of the second object in an ordered pair of objectsInvalidValueException
- when any of the given object's indices is smaller than zeropublic int size()
public int sizeS()
public int sizeSc()