semMatrixAlgebra updates. Added Imin helper function.