code: public static int getMinIndex(DoubleMatrix1D v){
  	  	int minIndex = -1;
  	  	double minValue = Double.MAX_VALUE;
  	  	for(int i=0; i<v.size(); i++){
  	  		if(v.getQuick(i)<minValue){
  	  			minIndex = i;
  	  			minValue = v.getQuick(i); 
  	  		}
  	  	}
  	  	return minIndex; 
  	  }
docs: Get the index of the minimum entry.