Class NaiveMCPSolver

java.lang.Object
org.ddolib.examples.mcp.NaiveMCPSolver

public class NaiveMCPSolver extends Object
Naive MCP solver which enumerates all the solution to find the best one. Used for tests.
  • Constructor Details

    • NaiveMCPSolver

      public NaiveMCPSolver(MCPProblem problem)
  • 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