Skip to content

Instantly share code, notes, and snippets.

@bartvollebregt
Created January 23, 2017 07:49
Show Gist options
  • Save bartvollebregt/991fed2a28352be42078626c5af0854c to your computer and use it in GitHub Desktop.
Save bartvollebregt/991fed2a28352be42078626c5af0854c to your computer and use it in GitHub Desktop.
private static List<List<List<Writable>>> prepareTempData(List<String> rawStrings, int from, int to) {
List<List<List<Writable>>> topSequences = new ArrayList<>();
List<List<Writable>> listOfSequences = new ArrayList<>();
boolean first = true;
for(int i=from;i < (to - 1);i++) {
if(first && from == 0) {
first = false;
continue;
}
List<Writable> sequence = new ArrayList<>();
sequence.add(new DoubleWritable(Double.parseDouble(rawStrings.get(i))));
listOfSequences.add(sequence);
}
topSequences.add(listOfSequences);
return topSequences;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment