code: public long getIdx(int[] indices){
  		long idx=0;
  		int i=indices.length-1;
  
  		for(int j=0;i>0&&j<indices.length-1;i--,j++)
  			idx += indices[i]*dim[j];
  		idx += indices[0];
  		return idx;
  	}
docs: 将多维索引转换为列排序索引
  @param indices
  @return
  Jul 29, 2009