uk.ac.leeds.ccg.andyt.grids.utilities
Class UnsignedLongPowersOf2

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.utilities.UnsignedLongPowersOf2

public class UnsignedLongPowersOf2
extends java.lang.Object

TODO: docs


Field Summary
 long[] powersOf2
          For storing the powers Of 2
 
Constructor Summary
UnsignedLongPowersOf2()
          Creates a new instance of PowersOf2 Defaults array to length 63.
UnsignedLongPowersOf2(boolean ascending)
          Creates a new instance of PowersOf2 Defaults array to length 63.
 
Method Summary
static void main(java.lang.String[] args)
          For testing...
 long powerOf2(int value)
          Returns 2 raised to the power of value as a long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

powersOf2

public long[] powersOf2
For storing the powers Of 2

Constructor Detail

UnsignedLongPowersOf2

public UnsignedLongPowersOf2()
Creates a new instance of PowersOf2 Defaults array to length 63.


UnsignedLongPowersOf2

public UnsignedLongPowersOf2(boolean ascending)
Creates a new instance of PowersOf2 Defaults array to length 63.

Method Detail

main

public static void main(java.lang.String[] args)
For testing...


powerOf2

public long powerOf2(int value)
Returns 2 raised to the power of value as a long.

Parameters:
value - TODO: move this to the chunk master and have as a long[]. The look up should be faster than the creation on the fly.