public class CreateRandomGraphAction extends ComputationAction<Graph>
Constructor and Description |
---|
CreateRandomGraphAction(String graphname,
int maxEdges) |
CreateRandomGraphAction(String graphname,
int numberOfNodes,
float density) |
Modifier and Type | Method and Description |
---|---|
void |
addComputationListener(ComputationListener l)
Adds the Computation Listener
l to this action. |
void |
cancelComputation()
Cancels the computation started by execution of this
ComputationAction . |
void |
execute()
Causes this action to begin execution.
|
Graph |
getResult()
Returns the result of the computation.
|
void |
removeComputationListener(ComputationListener l)
Removes the Computation Listener
l from this action. |
getElapsedTime
public CreateRandomGraphAction(String graphname, int numberOfNodes, float density)
graphname
- the repository name of the generated graphnumberOfNodes
- the number of nodes of the random graphdensity
- the probability density with which an edge is added between two nodespublic CreateRandomGraphAction(String graphname, int maxEdges)
graphname
- the repository name of the generated graphmaxEdges
- the maximum number of edgespublic void execute()
Action
public Graph getResult()
ComputationAction
getResult
in class ComputationAction<Graph>
public void addComputationListener(ComputationListener l)
ComputationAction
l
to this action.addComputationListener
in class ComputationAction<Graph>
l
- the listener to receive computation eventspublic void removeComputationListener(ComputationListener l)
ComputationAction
l
from this action.removeComputationListener
in class ComputationAction<Graph>
l
- the listener to be removedpublic void cancelComputation()
ComputationAction
ComputationAction
.cancelComputation
in class ComputationAction<Graph>
Action.execute()