public class OPLASolutionSet
extends java.lang.Object
Constructor and Description |
---|
OPLASolutionSet(SolutionSet solutionSet) |
Modifier and Type | Method and Description |
---|---|
void |
distributeUserEvaluation(DistributeUserEvaluation distributeUserEvaluation)
Generalize the evaluatios in a cluster (see approaches in Bindewald, 2020)
|
java.util.List<Element> |
findElementWithNumberId(java.lang.Double id)
Find elements with a id
|
double[] |
generateSolutionFromElementsAndGetObjectives(Element element,
Solution solution)
Generate the Solution from elements and get the objective values
|
Solution |
get(int i) |
java.util.List<Element> |
getAllElementsFromSolution(Solution solution)
Get all elements from solution
|
java.util.List<Element> |
getArchitecturalElementsEvaluatedByClusterId(java.lang.Double clusterId)
Get architectural elements evaluated in a cluster
|
java.util.Map<java.lang.Double,java.util.Set<java.lang.Integer>> |
getClusterIds()
Get list of cluster ids
|
Solution |
getMax() |
int |
getMedia(java.util.Set<java.lang.Integer> values)
Get average of values
|
Solution |
getMin() |
double[] |
getNormalizedSolution(int i) |
java.util.List<Solution> |
getSolutions() |
SolutionSet |
getSolutionSet() |
java.util.List<Solution> |
getSolutionsWithArchitecturalEvaluations()
Get solutions that have architectural evaluations
|
java.util.List<Solution> |
getSolutionWithArchitecturalElementsEvaluatedByClusterId(java.lang.Double clusterId)
Get solutions with architectural elements evaluated in a cluster
|
boolean |
hasUserEvaluation()
Verify if has user evaluation
|
void |
printObjectivesToFile(java.lang.String path)
Writes the objective function values of the
Solution objects
into the set in a file. |
void |
printVariablesToFile(java.lang.String path)
Writes the decision variable values of the
Solution
solutions objects into the set in a file. |
double[] |
reduceBiDimensionalArray(double[][] biDimensionalArray)
Reduce one dimension from bi dimensional array
|
double[][] |
reduceThreeDimensionalArray(double[][][] treeDimensionalArray)
Reduce one dimensional in three dimensional array
|
void |
saveVariablesToFile(java.lang.String path) |
void |
saveVariablesToFile(java.lang.String path,
java.util.List<Info> funResults,
br.ufpr.dinf.gres.loglog.LogLog logger,
boolean generate)
Save variables in a file
|
void |
saveVariableToFile(Solution solution,
java.lang.String path)
Save solution in a file
|
void |
setSolutionSet(SolutionSet solutionSet) |
java.lang.String |
toStringObjectives(java.lang.String interaction)
Create a list from objectives.
|
java.lang.String |
toStringObjectivesAndElementsNumber(int startFrom)
Method to get a string of objectives and elements number.
|
double[][] |
writeAllElementsFromSolution(Solution solution)
Get all elements from solutions
|
double[] |
writeArchitecturalEvaluationsToMatrix()
Copies the objectives and Elements Number of the solution set to a matrix
Objectives, nrClasses, nrConcerns, nrInterfaces, nrPackages, nrVariationPoints, nrVariants, nrVariabilities, nrConcerns,
nrAbstractions, nrAgragations, nrAssociations, nrCompositions, nrDependencies, nrGeneralizations, nrRealizations, nrUsage
|
double[] |
writeCharacteristicsFromElement(Element element,
Solution solution)
Get characteristics from element in a solution (number id, element type, nr of classes, interfaces, attrs and methods, objectives, user evaluation)
|
double[][] |
writeObjectivesAndArchitecturalElementsNumberToMatrix()
Copies the objectives and Elements Number of the solution set to a matrix
Objectives, nrClasses, nrConcerns, nrInterfaces, nrPackages, nrVariationPoints, nrVariants, nrVariabilities, nrConcerns,
nrAbstractions, nrAgragations, nrAssociations, nrCompositions, nrDependencies, nrGeneralizations, nrRealizations, nrUsage
|
double[][] |
writeObjectivesAndElementsNumberEvaluationToMatrix()
Get objectives and elements number with evaluation
|
double[][] |
writeObjectivesAndElementsNumberToMatrix()
Copies the objectives and Elements Number of the solution set to a matrix
Objectives, nrClasses, nrConcerns, nrInterfaces, nrPackages, nrVariationPoints, nrVariants, nrVariabilities, nrConcerns,
nrAbstractions, nrAgragations, nrAssociations, nrCompositions, nrDependencies, nrGeneralizations, nrRealizations, nrUsage
|
double[] |
writeUserEvaluationsToMatrix()
Get user evaluations list
|
public OPLASolutionSet(SolutionSet solutionSet)
public SolutionSet getSolutionSet()
public void setSolutionSet(SolutionSet solutionSet)
public double[][] writeObjectivesAndElementsNumberToMatrix()
public double[][] writeObjectivesAndArchitecturalElementsNumberToMatrix()
public double[] generateSolutionFromElementsAndGetObjectives(Element element, Solution solution) throws java.lang.ClassNotFoundException
element
- specific element to add in solutionsolution
- specific solutionjava.lang.ClassNotFoundException
- Exception on create the new solution by parampublic double[] writeArchitecturalEvaluationsToMatrix()
public double[][] reduceThreeDimensionalArray(double[][][] treeDimensionalArray)
treeDimensionalArray
- array of objectivespublic double[] reduceBiDimensionalArray(double[][] biDimensionalArray)
biDimensionalArray
- array of objectivespublic double[][] writeAllElementsFromSolution(Solution solution)
solution
- specific solutionpublic double[] writeCharacteristicsFromElement(Element element, Solution solution)
element
- specific in a solutionsolution
- specific solutionpublic java.util.List<Element> getAllElementsFromSolution(Solution solution)
solution
- specific solutionpublic java.lang.String toStringObjectivesAndElementsNumber(int startFrom)
startFrom
- Number of objectivespublic java.lang.String toStringObjectives(java.lang.String interaction)
interaction
- interaction Numberpublic double[][] writeObjectivesAndElementsNumberEvaluationToMatrix()
public double[] writeUserEvaluationsToMatrix()
public boolean hasUserEvaluation()
public java.util.Map<java.lang.Double,java.util.Set<java.lang.Integer>> getClusterIds()
public int getMedia(java.util.Set<java.lang.Integer> values)
values
- valuespublic java.util.List<Solution> getSolutionsWithArchitecturalEvaluations()
public java.util.List<Element> getArchitecturalElementsEvaluatedByClusterId(java.lang.Double clusterId)
clusterId
- cluster idpublic java.util.List<Solution> getSolutionWithArchitecturalElementsEvaluatedByClusterId(java.lang.Double clusterId)
clusterId
- cluster idpublic void distributeUserEvaluation(DistributeUserEvaluation distributeUserEvaluation)
distributeUserEvaluation
- Approachpublic java.util.List<Element> findElementWithNumberId(java.lang.Double id)
id
- hash idpublic void saveVariableToFile(Solution solution, java.lang.String path)
solution
- specific solutionpath
- pathpublic void printObjectivesToFile(java.lang.String path)
Solution
objects
into the set in a file.path
- The output file namepublic void printVariablesToFile(java.lang.String path)
Solution
solutions objects into the set in a file.path
- The output file namepublic void saveVariablesToFile(java.lang.String path, java.util.List<Info> funResults, br.ufpr.dinf.gres.loglog.LogLog logger, boolean generate)
path
- pathfunResults
- information of each solutionlogger
- loggergenerate
- log without savepublic void saveVariablesToFile(java.lang.String path)
public double[] getNormalizedSolution(int i)
public Solution getMin()
public Solution getMax()
public Solution get(int i)
public java.util.List<Solution> getSolutions()