Added non zero methods to matrix classes