Package com.artelys.kalis
Class KSolutionContainer
- java.lang.Object
-
- com.artelys.kalis.KSolutionContainer
-
public class KSolutionContainer extends java.lang.Object
This class represent a pool of solution of a KProblem.
Example:
KProblem p(...); KSolver solver(p); solver.optimize(); KSolution sol = p.getSolutionContainer().getBestSolution();
- Since:
- 2016.1
- See Also:
KProblem
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
swigCMemOwn
-
Constructor Summary
Constructors Modifier Constructor Description KSolutionContainer()
protected
KSolutionContainer(long cPtr, boolean cMemoryOwn)
KSolutionContainer(KSolutionContainer toCopy)
KSolutionContainer(com.artelys.kalis.SWIGTYPE_p_KSolutionContainer_I solutionContainer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(KSolution solution)
Add a new solution of the solution containervoid
clear()
Remove all solutions from the solution containervoid
delete()
protected void
finalize()
KSolution
getBestSolution()
Return the best solution found (if applicable)protected static long
getCPtr(KSolutionContainer obj)
KSolution
getLastSolution()
Return the last solution foundint
getNumberOfSolutions()
Return the number of solutions foundKSolution
getSolution(int index)
Return solution by indexboolean
problemIsSolved()
Return true if the problem as at least one solution
-
-
-
Constructor Detail
-
KSolutionContainer
protected KSolutionContainer(long cPtr, boolean cMemoryOwn)
-
KSolutionContainer
public KSolutionContainer()
-
KSolutionContainer
public KSolutionContainer(KSolutionContainer toCopy)
-
KSolutionContainer
public KSolutionContainer(com.artelys.kalis.SWIGTYPE_p_KSolutionContainer_I solutionContainer)
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KSolutionContainer obj)
-
finalize
protected void finalize()
- Overrides:
finalize
in classjava.lang.Object
-
delete
public void delete()
-
add
public void add(KSolution solution)
Add a new solution of the solution container
-
getNumberOfSolutions
public int getNumberOfSolutions()
Return the number of solutions found
-
clear
public void clear()
Remove all solutions from the solution container
-
problemIsSolved
public boolean problemIsSolved()
Return true if the problem as at least one solution
-
getLastSolution
public KSolution getLastSolution()
Return the last solution found
-
getBestSolution
public KSolution getBestSolution()
Return the best solution found (if applicable)
-
getSolution
public KSolution getSolution(int index)
Return solution by index
-
-