|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelper
org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelperWithVarious
org.decisiondeck.jmcda.persist.xmcda2.XMCDAAlternativesMatrix
public class XMCDAAlternativesMatrix
Methods for reading alternative matrixes from XMCDA fragments, and writing matrixes of alternatives to XMCDA.
| Constructor Summary | |
|---|---|
XMCDAAlternativesMatrix()
Creates a new object which will use the default error management strategy XMCDAErrorsManager.ErrorManagement.THROW. |
|
XMCDAAlternativesMatrix(XMCDAErrorsManager errorsManager)
Creates a new object delegating error management to the given error manager in case of unexpected data read. |
|
| Method Summary | |
|---|---|
Set<Alternative> |
getAlternatives()
Retrieves a writeable view of the set of alternatives stored in this object. |
Set<Criterion> |
getCriteria()
Retrieves a writeable view of the set of criteria stored in this object. |
IFloatMatrix<Alternative,Alternative> |
readAlternativesFloatMatrix(XAlternativesComparisons xAlternativesComparisons)
Retrieves an alternative matrix corresponding to the given XMCDA information. |
IAltZeroToOneMatrix |
readAlternativesFuzzyMatrix(XAlternativesComparisons xAlternativesComparisons)
TODO think about this strange thing with the matrix types. |
Map<Criterion,IAltZeroToOneMatrix> |
readAlternativesFuzzyMatrixesByCriteria(XAlternativesComparisons xAlternativesComparisons)
Retrieves the alternative matrixes corresponding to the given XMCDA information, by criteria. |
void |
setAlternatives(Set<Alternative> alternatives)
Sets the alternatives stored in this object as the given ones. |
void |
setCriteria(Set<Criterion> criteria)
Sets the criteria stored in this object as the given ones. |
XAlternativesComparisons |
write(IRdFloatMatrix<Alternative,Alternative> matrix)
Retrieves the XMCDA equivalent of the given matrix. |
XAlternativesComparisons |
write(Map<Criterion,? extends IRdFloatMatrix<Alternative,Alternative>> matrixes)
Retrieves the XMCDA equivalent of the given matrix. |
| Methods inherited from class org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelper |
|---|
error, getStrategy, setStrategy |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMCDAAlternativesMatrix()
XMCDAErrorsManager.ErrorManagement.THROW.
public XMCDAAlternativesMatrix(XMCDAErrorsManager errorsManager)
errorsManager - not null.| Method Detail |
|---|
public Map<Criterion,IAltZeroToOneMatrix> readAlternativesFuzzyMatrixesByCriteria(XAlternativesComparisons xAlternativesComparisons)
throws InvalidInputException
Retrieves the alternative matrixes corresponding to the given XMCDA information, by criteria.
The returned map has no empty matrixes as values if no unexpected data was read. If unexpected data was read an empty matrix may have been created.
In case of unexpected data, an exception is thrown if this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy, otherwise, non conforming informations will be skipped.
xAlternativesComparisons - not null.
null.
InvalidInputException - iff unexpected content has been read and this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy.public XAlternativesComparisons write(IRdFloatMatrix<Alternative,Alternative> matrix)
matrix - not null, may be incomplete.
null.public XAlternativesComparisons write(Map<Criterion,? extends IRdFloatMatrix<Alternative,Alternative>> matrixes)
matrixes - not null, no null key or values. The matrixes in values may be incomplete.
It is not required that they contain homogeneous sets of rows or columns.
null.
public IFloatMatrix<Alternative,Alternative> readAlternativesFloatMatrix(XAlternativesComparisons xAlternativesComparisons)
throws InvalidInputException
Retrieves an alternative matrix corresponding to the given XMCDA information.
In case of unexpected data, an exception is thrown if this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy, otherwise, non conforming informations will be skipped.
xAlternativesComparisons - not null.
null.
InvalidInputException - iff unexpected content has been read and this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy.
public IAltZeroToOneMatrix readAlternativesFuzzyMatrix(XAlternativesComparisons xAlternativesComparisons)
throws InvalidInputException
TODO think about this strange thing with the matrix types.
Retrieves an alternative matrix corresponding to the given XMCDA information.
In case of unexpected data, an exception is thrown if this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy, otherwise, non conforming informations will be skipped.
xAlternativesComparisons - not null.
null.
InvalidInputException - iff unexpected content has been read and this object follows the XMCDAErrorsManager.ErrorManagement.THROW
strategy.public Set<Alternative> getAlternatives()
null.public void setAlternatives(Set<Alternative> alternatives)
alternatives - not null, may be empty.public Set<Criterion> getCriteria()
null.public void setCriteria(Set<Criterion> criteria)
criteria - not null, may be empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||