distributed matrix class