java.lang.Object
unifeat.featureSelection.wrapper.ACOBasedMethods.BasicGraphRepresentation
unifeat.featureSelection.wrapper.ACOBasedMethods.OptimalACO.GraphRepresentation

public class GraphRepresentation extends BasicGraphRepresentation
This java class is used to represent a graph in optimal ant colony optimization (optimal ACO) method.
Author:
Sina Tabakhi
See Also:
  • Constructor Details

    • GraphRepresentation

      public GraphRepresentation(int rows, int cols)
      Initializes the parameters
      Parameters:
      rows - the number of rows in the pheromone array
      cols - the number of columns in the pheromone array
  • Method Details

    • setPheromone

      public void setPheromone(double value, int indexRow, int indexCol)
      This method sets a pheromone value in a specific entry of the array.
      Specified by:
      setPheromone in class BasicGraphRepresentation
      Parameters:
      value - the input pheromone value
      indexRow - the index of the row in the pheromone array
      indexCol - the index of the column in the pheromone array
    • getPheromone

      public double getPheromone(int indexRow, int indexCol)
      This method returns a pheromone value in a specific entry of the pheromone array that is determined by indeces of the row and column
      Specified by:
      getPheromone in class BasicGraphRepresentation
      Parameters:
      indexRow - the index of the row in the pheromone array
      indexCol - the index of the column in the pheromone array
      Returns:
      a pheromone value