SHARE
TWEET

Untitled

a guest Jun 9th, 2011 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.nio.channels.FileChannel;
  2. import java.nio.ByteBuffer;
  3. import java.nio.ByteOrder;
  4. import static java.nio.channels.FileChannel.MapMode.READ_ONLY;
  5. import static java.nio.ByteOrder.LITTLE_ENDIAN;
  6.  
  7. ---
  8.  
  9.         FileChannel fileChannel = new FileInputStream("gaussian.dat").getChannel();
  10.         fileChannel.map(READ_ONLY, 0, fileChannel.size()).order(LITTLE_ENDIAN).asDoubleBuffer().get(data);
  11.        
  12.         while (end < data.length) {
  13.             pool.submit(new Partitioner(data, partitions, bucketCount, begin, end));
  14.             begin += batchSize; end += batchSize;
  15.         }
  16.         pool.submit(new Partitioner(data, partitions, bucketCount,
  17.                 begin, data.length));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top