org.decisiondeck.xmcda_oo.utils
Class EvaluationsUtils
java.lang.Object
org.decisiondeck.xmcda_oo.utils.EvaluationsUtils
public class EvaluationsUtils
- extends Object
|
Method Summary |
static
|
approxEquals(IRdFloatMatrix<Row,Column> m1,
IRdFloatMatrix<Row,Column> m2,
double imprecision)
Does not use the matrixes definition of approxEquals, so that this method may be used in implementing objects. |
static IRdEvaluations |
complement(IRdEvaluations evaluations,
Set<Alternative> removeAlternatives)
|
static EvaluationMatrix |
getCopy(IRdEvaluations evaluations)
|
static IRdEvaluations |
getReadView(IRdEvaluations evaluations)
|
static EvaluationMatrix |
merge(IRdFloatMatrix<Alternative,Criterion> m1,
IRdFloatMatrix<Alternative,Criterion> m2)
|
static IRdEvaluations |
restrictedView(IRdEvaluations evaluations,
Predicate<Alternative> restrictToAlternatives,
Predicate<Criterion> restrictToCriteria)
Retrieves a view restricting to the given sets. |
static IRdEvaluations |
restrictTo(IRdEvaluations evaluations,
Set<Alternative> restrictAlternatives)
|
static IRdEvaluations |
union(IRdEvaluations evaluations1,
IRdEvaluations evaluations2)
Retrieves an evaluations view delegating to the given evaluations and combining both sets of information. |
EvaluationsUtils
public EvaluationsUtils()
merge
public static EvaluationMatrix merge(IRdFloatMatrix<Alternative,Criterion> m1,
IRdFloatMatrix<Alternative,Criterion> m2)
complement
public static IRdEvaluations complement(IRdEvaluations evaluations,
Set<Alternative> removeAlternatives)
restrictTo
public static IRdEvaluations restrictTo(IRdEvaluations evaluations,
Set<Alternative> restrictAlternatives)
union
public static IRdEvaluations union(IRdEvaluations evaluations1,
IRdEvaluations evaluations2)
- Retrieves an evaluations view delegating to the given evaluations and combining both sets of information.
- Parameters:
evaluations1 - not null.evaluations2 - not null.
- Returns:
- not
null, a read-only view.
approxEquals
public static <Row,Column> boolean approxEquals(IRdFloatMatrix<Row,Column> m1,
IRdFloatMatrix<Row,Column> m2,
double imprecision)
- Does not use the matrixes definition of approxEquals, so that this method may be used in implementing objects.
- Type Parameters:
Row - the row type.Column - the column type.- Parameters:
m1 - not null.m2 - may be null (then returns false).imprecision - the allowed imprecision.
- Returns:
true iff both contents have values at the same positions and these values are not further
than the given imprecision.
getCopy
public static EvaluationMatrix getCopy(IRdEvaluations evaluations)
getReadView
public static IRdEvaluations getReadView(IRdEvaluations evaluations)
restrictedView
public static IRdEvaluations restrictedView(IRdEvaluations evaluations,
Predicate<Alternative> restrictToAlternatives,
Predicate<Criterion> restrictToCriteria)
- Retrieves a view restricting to the given sets.
- Parameters:
evaluations - not null.restrictToAlternatives - null for no restriction.restrictToCriteria - null for no restriction.
- Returns:
- not
null, a read-only view.
Copyright © 2011. All Rights Reserved.