xxl.spatial
Class Universe
java.lang.Object
|
+--xxl.spatial.Universe
- public class Universe
- extends java.lang.Object
- implements Convertable, java.lang.Cloneable
The Universe describes the area of the data and
provides methods for z-code computation.
|
Field Summary |
protected Rectangle |
area
The Rectangle of the Universe. |
protected double[] |
deltas
The extension of the Universe in each dimension. |
protected double[] |
ints
ints[d] = deltas[d] * Integer.MAX_VALUE (This is useful for
z-code computation). |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
area
protected Rectangle area
- The Rectangle of the Universe.
deltas
protected double[] deltas
- The extension of the Universe in each dimension.
ints
protected double[] ints
- ints[d] = deltas[d] * Integer.MAX_VALUE (This is useful for
z-code computation).
Universe
public Universe(int dim)
Universe
public Universe(Rectangle area)
Universe
public Universe(Rectangle area1,
Rectangle area2)
Universe
public Universe(java.io.File file1,
java.io.File file2,
int dim)
clone
protected java.lang.Object clone()
- Overrides:
- clone in class java.lang.Object
dimensions
public int dimensions()
init
public void init()
locationalCode
public LocationalCode locationalCode(Rectangle rectangle)
- Calculates int-values for the given double-values and computes
LocationalCode.
locationalCode
public LocationalCode locationalCode(Rectangle rectangle,
int maxLevel)
read
public void read(java.io.DataInput dataInput)
throws java.io.IOException
- Specified by:
- read in interface Convertable
write
public int write(java.io.DataOutput dataOutput)
throws java.io.IOException
- Specified by:
- write in interface Convertable
sizeOf
public int sizeOf()
- Specified by:
- sizeOf in interface Convertable
createUniverse
public static Universe createUniverse(java.io.File input,
Function newObject)
readUniverse
public static Universe readUniverse(java.io.File file,
int dim)
locationalCode
public static LocationalCode locationalCode(int[] p1,
int[] p2)
- Expects a LocationalCode with cell == null.
zCode
public static BitSet zCode(int[] p,
int first)
- Creates a BitSet and computes the z-value for a given Point p. The intPrecision of the
z-value is min(intPrecision,first)
level
public static int level(int[] p1,
int[] p2)
- Computes the level of the
rectangle with the lower left corner p1 and the upper right
corner p2 in a quadtree.
The level is returned.
level
public static int level(int[] p)
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
main
public static void main(java.lang.String[] args)