could you use m(col,row) instead? SGMatrix supports this operator, it makes the code easier to read. I guess thats the transpose here? Does this really work for all cases N=D, N>D, N<D ? Make sure to unit test all of those (sorry for being so pendantic)
Also, I miss the transposing back after the cutting off.