Package org.ddolib.examples.mcp
Class NaiveMCPSolver
java.lang.Object
org.ddolib.examples.mcp.NaiveMCPSolver
Naive MCP solver which enumerates all the solution to find the best one. Used for tests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbest()int[]static intgetOptimalSolution(int[][] matrix) Given an adjacency matrix, solves naively the instance of MCP.voidmaximize()
-
Constructor Details
-
NaiveMCPSolver
-
-
Method Details
-
best
public int best() -
bestSolution
public int[] bestSolution() -
maximize
public void maximize() -
getOptimalSolution
public static int getOptimalSolution(int[][] matrix) Given an adjacency matrix, solves naively the instance of MCP.- Parameters:
matrix- The adjacency matrix defining the MCP- Returns:
- The optimal solution of the MCP
-