Skip to content

Instantly share code, notes, and snippets.

@zwilias
Created January 20, 2014 21:51
Show Gist options
  • Save zwilias/8529925 to your computer and use it in GitHub Desktop.
Save zwilias/8529925 to your computer and use it in GitHub Desktop.
/* Initialise all rearrangement matrices */
lowerX = new RearrangeMatrix(data.getLowerX());
lowerY = new RearrangeMatrix(data.getLowerY());
upperX = new RearrangeMatrix(data.getUpperX());
upperY = new RearrangeMatrix(data.getUpperY());
ExecutorService executor = Executors.newFixedThreadPool(2);
for (final RearrangeMatrix matrix : new RearrangeMatrix[]{lowerX, lowerY, upperX, upperY}) {
executor.execute(new Runnable() {
@Override
public void run() {
matrix.rearrange();
}});
}
executor.shutdown();
try {
executor.awaitTermination(99, TimeUnit.DAYS);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
/* Print RA Ranges */
printRanges();
/* Print total duration */
printDuration(start);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment