|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinput.ExternalMovementReader
public class ExternalMovementReader
Reader for ExternalMovement movement model's time-location tuples.
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.
Field Summary | |
---|---|
static java.lang.String |
COMMENT_PREFIX
|
Constructor Summary | |
---|---|
ExternalMovementReader(java.lang.String inFilePath)
Constructor. |
Method Summary | |
---|---|
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<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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COMMENT_PREFIX
Constructor Detail |
---|
public ExternalMovementReader(java.lang.String inFilePath)
inFilePath
- Path to the file where the data is read
SettingsError
- if the file wasn't foundMethod Detail |
---|
public 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<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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |