Created
January 20, 2014 21:51
-
-
Save zwilias/8529925 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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