public class CoordFloatString
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
tcount
the number of tuples
|
int |
tsize
the number of elements in a tuple
|
double[] |
vals
where we store the data as x1,y1,z1,x2,y2,z2,...
|
Constructor and Description |
---|
CoordFloatString(int tuplecount,
int tuplesize,
BinaryFile input)
Construct a CoordFloatString from a file input
|
Modifier and Type | Method and Description |
---|---|
double |
getasFloat(int tuple,
int val)
Get a value in a tuple
|
double[] |
getasFloatV(int tuple)
Get a tuple
|
double |
getXasFloat(int tuple)
Get the first value of a tuple
|
double |
getYasFloat(int tuple)
Get the second value of a tuple
|
double |
getZasFloat(int tuple)
Get the third value of a tuple
|
int |
maxIndex()
The maximum indexable tuple value
|
java.lang.String |
toString()
A pretty formatter for the floatstring
|
public int tcount
public int tsize
public double[] vals
public CoordFloatString(int tuplecount, int tuplesize, BinaryFile input) throws FormatException
tuplecount
- the number of tuples to read from the input
streamtuplesize
- the number of floats in the tupleinput
- the input stream to read everything fromFormatException
- if we have IO errors or premature
end-of-filepublic int maxIndex()
public java.lang.String toString()
toString
in class java.lang.Object
public double getXasFloat(int tuple)
tuple
- the index of the tupletuple
public double getYasFloat(int tuple)
tuple
- the index of the tupletuple
public double getZasFloat(int tuple)
tuple
- the index of the tupletuple
public double[] getasFloatV(int tuple)
tuple
- the index of the tupletuple
public double getasFloat(int tuple, int val)
tuple
- the index of the tupleval
- the index of the valuetuple
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details