sMatrix class