|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.EventObject
com.Bayesia.positioning.event.ProgressEvent
The class ProgressEvent is used to indicate the progress
of a positioning algorithm.
It can be either GeneticPositioning or
SymmetricPositioning
It indicates the current progress of the algorithm, the type of the event (start, progress, end)
and the mode of the algorithm (limited or infinite).
According to the type of algorithm, it specify the current score and the last individual chosen for
the GeneticPositioning algorithm and the preferred length of the edges for the
SymmetricPositioning algorithm.
Please see ProgressListener.
| Field Summary | |
static int |
END_EVENT
Type of the event when the progression ends. |
static int |
INFINITE
Mode of the algorithm if no number of iterations is specified. |
static int |
LIMITED
Mode of the algorithm if a number of iterations is specified. |
static int |
PROGRESS_EVENT
Type of the event when the progression continues. |
static int |
START_EVENT
Type of the event when the progression starts. |
| Fields inherited from class java.util.EventObject |
source |
| Constructor Summary | |
ProgressEvent(java.lang.Object source,
int type,
int progress,
int maximum,
double length)
Create a new ProgressEvent with the current progress, the maximum number of iterations and the preferred length og the edges.
|
|
ProgressEvent(java.lang.Object source,
int type,
int progress,
int maximum,
double score,
int individual)
Create a new ProgressEvent with the current progress, the maximum number of generations, the last score and the last individual chosen.
|
|
| Method Summary | |
int |
getIndividual()
Return the last individual chosen in the population. |
double |
getLength()
Return the preferred length of the edges according to the available dimension of the graph. |
int |
getMaximum()
The maximum number of generations or -1 if no maximum is specified. |
int |
getMode()
|
int |
getProgress()
The progress is always between 0 and getMaximum() if the maximum is specified. |
double |
getScore()
Return the score of the last individual chosen. |
int |
getType()
If the progress is 0, it returns START_EVENT,
if the progress is 100, it returns END_EVENT,
otherwise it returns PROGRESS_EVENT. |
java.lang.String |
toString()
Return a String representation of this ProgressEvent. |
| Methods inherited from class java.util.EventObject |
getSource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int INFINITE
public static final int LIMITED
public static final int START_EVENT
public static final int PROGRESS_EVENT
public static final int END_EVENT
| Constructor Detail |
public ProgressEvent(java.lang.Object source,
int type,
int progress,
int maximum,
double score,
int individual)
ProgressEvent with the current progress, the maximum number of generations, the last score and the last individual chosen.
Used by GeneticPositioning.
source - the source positioning algorithm (i.e. GeneticPositioning)type - the type of the eventprogress - the current progressmaximum - the maximum number of iterations if specifiedscore - the current score of the algorithmindividual - the last individual chosen
public ProgressEvent(java.lang.Object source,
int type,
int progress,
int maximum,
double length)
ProgressEvent with the current progress, the maximum number of iterations and the preferred length og the edges.
Used by SymmetricPositioning.
source - the source positioning algorithm (i.e. SymmetricPositioning)type - the type of the eventprogress - the current progressmaximum - always -1 with the SymmetricPositioninglength - the preferred length og the edges| Method Detail |
public int getMode()
INFINITE,
LIMITEDpublic int getProgress()
public int getType()
START_EVENT,
if the progress is 100, it returns END_EVENT,
otherwise it returns PROGRESS_EVENT.
START_EVENT,
PROGRESS_EVENT,
END_EVENTpublic int getIndividual()
GeneticPositioning only.
public int getMaximum()
GeneticPositioning.
Return always -1 with the SymmetricPositioning.
GeneticPositioningAlgorithmpublic double getScore()
GeneticPositioning only.
public double getLength()
SymmetricPositioning only.
public java.lang.String toString()
ProgressEvent.
Object.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||