org.decisiondeck.xmcda_oo.data
Class BasicGenerator

java.lang.Object
  extended by org.decisiondeck.xmcda_oo.data.BasicGenerator
Direct Known Subclasses:
RandomGeneratorOld

Deprecated. Use DataGenerator.

@Deprecated
public class BasicGenerator
extends Object

An object to generate basic problem data. Generates deterministically. Some data generation require other data (indicated in the method contract), in this case the user has two choices. Either the required data has been previously set in this object (by direct setting or by generation of this data), and it is used, or it does not exist yet and then is generated on the fly by this object. If the required data has been set previously but is not in the appropriate number (e.g. 10 criteria have been set but now the user asks for only 9 scales), an error is thrown. This object remembers what it generates so one usage pattern is to call all the appropriate methods without taking care of the returned values and get the whole problem at once at the end.

Asking to generate some data that has been set already (either through direct setting or through generation) erases the previous content and replace it. Associated data is deleted as well, e.g. when re-generating the criteria, possibly existing scales associated with previously generated criteria are removed.

Methods return copies, modification of these returned objects do not impact this one.


Nested Class Summary
static class BasicGenerator.DefaultNamer
          Deprecated.  
 
Field Summary
static int END_OF_SCALE
          Deprecated. Last value that evaluations may take (thus, this value inclusive).
static int START_OF_SCALE
          Deprecated.  
 
Constructor Summary
BasicGenerator()
          Deprecated. Default public constructor.
 
Method Summary
 boolean areIdsInts()
          Deprecated.  
 Set<Alternative> genAlternatives(int nbAlternatives)
          Deprecated.  
 ICatsAndProfs genCategories(int nbCategories)
          Deprecated. Uses the profiles.
 Set<Criterion> genCriteria(int nbCriteria)
          Deprecated.  
 Set<DecisionMaker> genDms(int nbDms)
          Deprecated.  
 SortedSet<Alternative> genProfiles(int nbProfiles)
          Deprecated. Note that this replaces possibly existing categories in this object.
 Map<Criterion,IntegerStepScaleToDel> genScales(int nbScales)
          Deprecated. Uses the criteria.
 IEvaluations genSplitProfilesEvaluations(int nbProfiles, int nbCriteria)
          Deprecated. requires ordered intervals, integer scales, and other oddities.
 Function<Integer,String> getAlternativeNamer()
          Deprecated.  
 IGroupSortingResultsWithCredibilities getData()
          Deprecated. Retrieves a read-only view of the data contained in this object (i.e. the data which has been generated).
 boolean roundsUp()
          Deprecated.  
 void setAlternativeNamer(Function<Integer,String> alternativeNamer)
          Deprecated.  
 void setAlternatives(Set<Alternative> alternatives)
          Deprecated.  
 void setCategories(ICatsAndProfs categories)
          Deprecated.  
 void setCriteria(Set<Criterion> criteria)
          Deprecated.  
 void setDms(Set<DecisionMaker> dms)
          Deprecated.  
 void setRoundUp(boolean roundUp)
          Deprecated.  
 void setScales(Map<Criterion,IOrderedInterval> scales)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

END_OF_SCALE

public static final int END_OF_SCALE
Deprecated. 
Last value that evaluations may take (thus, this value inclusive).

See Also:
Constant Field Values

START_OF_SCALE

public static final int START_OF_SCALE
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

BasicGenerator

public BasicGenerator()
Deprecated. 
Default public constructor.

Method Detail

genScales

public Map<Criterion,IntegerStepScaleToDel> genScales(int nbScales)
Deprecated. 
Uses the criteria.

Parameters:
nbScales - to generate.
Returns:
not null.

genProfiles

public SortedSet<Alternative> genProfiles(int nbProfiles)
Deprecated. 
Note that this replaces possibly existing categories in this object.

Parameters:
nbProfiles - to generate.
Returns:
the generated profiles.

genDms

public Set<DecisionMaker> genDms(int nbDms)
Deprecated. 

genAlternatives

public Set<Alternative> genAlternatives(int nbAlternatives)
Deprecated. 

getData

public IGroupSortingResultsWithCredibilities getData()
Deprecated. 
Retrieves a read-only view of the data contained in this object (i.e. the data which has been generated).

Returns:
not null.

genCategories

public ICatsAndProfs genCategories(int nbCategories)
Deprecated. 
Uses the profiles. They must be not set or be in quantity nbCategories-1.

Parameters:
nbCategories - the number of categories to generate.
Returns:
not null.

genSplitProfilesEvaluations

@Deprecated
public IEvaluations genSplitProfilesEvaluations(int nbProfiles,
                                                           int nbCriteria)
Deprecated. requires ordered intervals, integer scales, and other oddities.

Uses the profiles, the criteria, the scales.

Parameters:
nbProfiles - to generate (or use if exist) - also generates the categories!. TODO better doc.
nbCriteria - to generate (or use if exist).
Returns:
not null.

genCriteria

public Set<Criterion> genCriteria(int nbCriteria)
Deprecated. 

areIdsInts

public boolean areIdsInts()
Deprecated. 

roundsUp

public boolean roundsUp()
Deprecated. 

setRoundUp

public void setRoundUp(boolean roundUp)
Deprecated. 

setCriteria

public void setCriteria(Set<Criterion> criteria)
Deprecated. 

setScales

public void setScales(Map<Criterion,IOrderedInterval> scales)
Deprecated. 

setCategories

public void setCategories(ICatsAndProfs categories)
Deprecated. 

setDms

public void setDms(Set<DecisionMaker> dms)
Deprecated. 

getAlternativeNamer

public Function<Integer,String> getAlternativeNamer()
Deprecated. 

setAlternativeNamer

public void setAlternativeNamer(Function<Integer,String> alternativeNamer)
Deprecated. 

setAlternatives

public void setAlternatives(Set<Alternative> alternatives)
Deprecated. 


Copyright © 2011. All Rights Reserved.