Class BasicGraphRepresentation
java.lang.Object
unifeat.featureSelection.wrapper.ACOBasedMethods.BasicGraphRepresentation
- Direct Known Subclasses:
- GraphRepresentation
The abstract class contains the main methods and fields that are used to
 represent discrete search space as a graph in ACO algorithm. The graph is
 implemented as an 2D array.
- Author:
- Sina Tabakhi
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfillPheromoneArray(double value) This method fills all entries of the pheromone array with a specific input value.abstract doublegetPheromone(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 columnprotected abstract voidsetPheromone(double value, int indexRow, int indexCol) This method sets a pheromone value in a specific entry of the array.toString()Returns a string representation of the graph.
- 
Field Details- 
pheromoneprotected double[][] pheromone
 
- 
- 
Constructor Details- 
BasicGraphRepresentationpublic BasicGraphRepresentation(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- 
setPheromoneprotected abstract void setPheromone(double value, int indexRow, int indexCol) This method sets a pheromone value in a specific entry of the array.- 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
 
- 
getPheromonepublic abstract 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- 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
 
- 
fillPheromoneArraypublic void fillPheromoneArray(double value) This method fills all entries of the pheromone array with a specific input value.- Parameters:
- value- the input value
 
- 
toStringReturns a string representation of the graph.
 
-