java.lang.Object
es.upm.fi.cig.multictbnc.learning.structure.optimisation.hillclimbing.HillClimbingSolution

public class HillClimbingSolution extends Object
Class used to contain the solution given by the hill climbing algorithms. This includes the adjacency matrix of the found structure and its score.
  • Constructor Details

    • HillClimbingSolution

      public HillClimbingSolution()
  • Method Details

    • getAdjacencyMatrix

      public boolean[][] getAdjacencyMatrix()
      Returns the adjacency matrix of the structure.
      Returns:
      adjacency matrix of the structure
    • getModifiedArcs

      public int[][] getModifiedArcs()
      Returns the last arc modified.
      Returns:
      int[][] with the first dimension referring to the index of the operation applied to the arc and the second dimension being of size two and representing the modified arc. The first position is for the parent node index and the second for the child.
    • getScore

      public double getScore()
      Returns the score of the structure found.
      Returns:
      score of the found structure
    • setAdjacencyMatrix

      public void setAdjacencyMatrix(boolean[][] adjacencyMatrix)
      Sets the adjacency matrix of the structure.
      Parameters:
      adjacencyMatrix - adjacency matrix of the structure
    • setArcModified

      public void setArcModified(int idxParent, int idxChild, int idxOperation)
      Define the last arc that was modified.
      Parameters:
      idxParent - index of the parent node
      idxChild - index of the child node
      idxOperation - index of the operation performed
    • setScore

      public void setScore(double score)
      Sets the score of the structure found.
      Parameters:
      score - score of the structure found