public class LayoutInfo extends Data
Constructor and Description |
---|
LayoutInfo(int nrOfNodes,
int nrOfEdges)
Creates a new LayoutInfo instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addTimingMeasurement(long t)
Add a timing measurement for the last finished step in the layout.
|
protected javax.json.JsonObjectBuilder |
convertToJson()
Converts this piece of data to JSON, which is then suitable of being stored in a database.
|
protected java.lang.String |
getKey()
Returns a key with which data of this type can be identified.
|
java.util.List<java.lang.Long> |
getMeasurements() |
int |
getNrOfEdges() |
int |
getNrOfNodes() |
long |
getTotalTime() |
void |
setTotalTime(long t)
Sets the total time spent for the last layout.
|
void |
setWasInterrupted(boolean wasInterrupted)
Sets whether execution of the layout algorithm was interrupted.
|
boolean |
wasInterrupted() |
getAnnotatedJson
public LayoutInfo(int nrOfNodes, int nrOfEdges)
nrOfNodes
- The number of nodes in the graph being laid out.nrOfEdges
- The number of edges in the graph being laid out.public void addTimingMeasurement(long t)
t
- The time taken for the last step, in milliseconds.public void setTotalTime(long t)
t
- The total time t for the last layout, in milliseconds.public void setWasInterrupted(boolean wasInterrupted)
wasInterrupted
- Whether execution was interrupted.public boolean wasInterrupted()
public int getNrOfEdges()
public int getNrOfNodes()
public long getTotalTime()
public java.util.List<java.lang.Long> getMeasurements()
protected javax.json.JsonObjectBuilder convertToJson()
Data
Data.getAnnotatedJson()
and
a time stamp is added to the object.convertToJson
in class Data