smallDist = begin()->dist; //set the first candidate small distance
for(MatData currentCell=begin();currentCell!=end();currentCell++){
smallDist = begin()->dist; //set the first candidate small distance
for(MatData currentCell=begin();currentCell!=end();currentCell++){