Iterator<MatrixSlice> mttIt = mtt.iterateAll();
Map<Integer, Vector> mMap = new HashMap<Integer,Vector>();
Map<Integer, Vector> mttMap = new HashMap<Integer, Vector>();
while(mIt.hasNext() && mttIt.hasNext()) {
MatrixSlice ms = mIt.next();
mMap.put(ms.index(), ms.vector());
MatrixSlice mtts = mttIt.next();
mttMap.put(mtts.index(), mtts.vector());
}
for(Map.Entry<Integer, Vector> entry : mMap.entrySet()) {
Integer key = entry.getKey();