public class ExternalMovementReader
extends java.lang.Object
First line of the file should be the offset header. Syntax of the header
should be:
minTime maxTime minX maxX minY maxY minZ maxZ
Last two values (Z-axis) are ignored at the moment but can be present
in the file.
Following lines' syntax should be:
time id xPos yPos
where time is the time when a node with id should
be at location (xPos, yPos).
All lines must be sorted by time. Sampling interval (time difference between two time instances) must be same for the whole file.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMENT_PREFIX |
| Constructor and Description |
|---|
ExternalMovementReader(java.lang.String inFilePath)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getLastTimeStamp()
Returns the time stamp where the last moves read with
readNextMovements() belong to. |
double |
getMaxTime()
Returns offset maxTime
|
double |
getMaxX()
Returns offset maxX
|
double |
getMaxY()
Returns offset maxY
|
double |
getMinTime()
Returns offset minTime
|
double |
getMinX()
Returns offset minX
|
double |
getMinY()
Returns offset minY
|
java.util.List<util.Tuple<java.lang.String,Coord>> |
readNextMovements()
Reads all new id-coordinate tuples that belong to the same time instance
|
void |
setNormalize(boolean normalize)
Sets normalizing of read values on/off.
|
public static final java.lang.String COMMENT_PREFIX
public ExternalMovementReader(java.lang.String inFilePath)
inFilePath - Path to the file where the data is readSettingsError - if the file wasn't foundpublic void setNormalize(boolean normalize)
readNextMovements() are decremented by minimum values of the
offsets. Default is on (normalize).normalize - If true, normalizing is on (false -> off).public java.util.List<util.Tuple<java.lang.String,Coord>> readNextMovements()
SettingError - if an invalid line was readpublic double getLastTimeStamp()
readNextMovements() belong to.public double getMaxTime()
public double getMaxX()
public double getMaxY()
public double getMinTime()
public double getMinX()
public double getMinY()