Saturday, June 14, 2008

Ant Colony Optimization(ACO)

Introduction of Ant Colony Optimization(ACO):
Ant Colony Optimization is a probabilistic technique for searching based on Ant's foraging behavior. The concept was derived by Macro Dorigo. It best used for solving combinatorial optimization problems. Best suitable for minimization of multiple paths from a search graph.

Example applications are: TSP, Intelligent Routing, Classification etc.

Usage of Comparable interface in core Java:

Comparable interface is used to make your object comparable to other objects. Comparable interface has int compareTo(Object object). One can override this method to provide appropriate comparison of this object to the other object which is sent as an argument to this method.

Example:
Class Empoyee impements Comparable{

String name;

public int compareTo(Object otherObject){
int retValue = -1;
if(otherObject instanceOf Employee){
retValue = getName().compareTo(otherObject .getName());
}

return retValue;
}

}