Class GraphRepresentation
java.lang.Object
unifeat.featureSelection.wrapper.ACOBasedMethods.BasicGraphRepresentation
unifeat.featureSelection.wrapper.ACOBasedMethods.OptimalACO.GraphRepresentation
This java class is used to represent a graph in optimal ant colony
optimization (optimal ACO) method.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Fields inherited from class unifeat.featureSelection.wrapper.ACOBasedMethods.BasicGraphRepresentation
pheromone
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
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 columnvoid
setPheromone
(double value, int indexRow, int indexCol) This method sets a pheromone value in a specific entry of the array.Methods inherited from class unifeat.featureSelection.wrapper.ACOBasedMethods.BasicGraphRepresentation
fillPheromoneArray, toString
-
Constructor Details
-
GraphRepresentation
public GraphRepresentation(int rows, int cols) Initializes the parameters- Parameters:
rows
- the number of rows in the pheromone arraycols
- 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 classBasicGraphRepresentation
- Parameters:
value
- the input pheromone valueindexRow
- the index of the row in the pheromone arrayindexCol
- 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 classBasicGraphRepresentation
- Parameters:
indexRow
- the index of the row in the pheromone arrayindexCol
- the index of the column in the pheromone array- Returns:
- a pheromone value
-