|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjswarm_pso.FitnessFunction
Base Fitness Function
| Field Summary | |
(package private) boolean |
maximize
Should this funtion be maximized or minimized |
| Constructor Summary | |
FitnessFunction()
Default constructor |
|
FitnessFunction(boolean maximize)
Constructor |
|
| Method Summary | |
abstract double |
evaluate(double[] position)
Evaluates a particles at a given position NOTE: You should write your own method! |
double |
evaluate(Particle particle)
Evaluates a particles |
boolean |
isMaximize()
Are we maximizing this fitness funtion? |
void |
setMaximize(boolean maximize)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
boolean maximize
| Constructor Detail |
public FitnessFunction()
public FitnessFunction(boolean maximize)
maximize - : Should we try to maximize or minimize this funtion?| Method Detail |
public abstract double evaluate(double[] position)
position - : Particle's position
public double evaluate(Particle particle)
particle - : Particle to evaluate
public boolean isMaximize()
public void setMaximize(boolean maximize)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||