change iterator to for loop to save time.
diff --git a/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/hyracks/dataflow/MapReadToNodeOperator.java b/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/hyracks/dataflow/MapReadToNodeOperator.java
index cf9d566..80834f7 100644
--- a/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/hyracks/dataflow/MapReadToNodeOperator.java
+++ b/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/hyracks/dataflow/MapReadToNodeOperator.java
@@ -203,7 +203,8 @@
private void setReverseOutgoingList(NodeReference node, int offset) {
setCachList(offset);
- for (PositionWritable pos : cachePositionList) {
+ for(int i = 0; i < cachePositionList.getCountOfPosition(); i++){
+ PositionWritable pos = cachePositionList.getPosition(i);
if (pos.getPosInRead() > 0) {
node.getRFList().append(pos);
} else {
@@ -214,7 +215,8 @@
private void setReverseIncomingList(NodeReference node, int offset) {
setCachList(offset);
- for (PositionWritable pos : cachePositionList) {
+ for(int i = 0; i < cachePositionList.getCountOfPosition(); i++){
+ PositionWritable pos = cachePositionList.getPosition(i);
if (pos.getPosInRead() > 0) {
if (pos.getPosInRead() > 1) {
node.getFRList().append(pos.getReadID(), (byte) (pos.getPosInRead() - 1));
@@ -231,7 +233,8 @@
private void setForwardOutgoingList(NodeReference node, int offset) {
setCachList(offset);
- for (PositionWritable pos : cachePositionList) {
+ for(int i = 0; i < cachePositionList.getCountOfPosition(); i++){
+ PositionWritable pos = cachePositionList.getPosition(i);
if (pos.getPosInRead() > 0) {
node.getFFList().append(pos);
} else {
@@ -242,7 +245,8 @@
private void setForwardIncomingList(NodeReference node, int offset) {
setCachList(offset);
- for (PositionWritable pos : cachePositionList) {
+ for(int i = 0; i < cachePositionList.getCountOfPosition(); i++){
+ PositionWritable pos = cachePositionList.getPosition(i);
if (pos.getPosInRead() > 0) {
if (pos.getPosInRead() > 1) {
node.getRRList().append(pos.getReadID(), (byte) (pos.getPosInRead() - 1));