def test_mul(self): assert_equals(self.x_spmat * self.x_spmat, self.x_spmat) assert_equals(self.diag_spmat * self.coo_spmat, self.coo_spmat) assert_equals(BoolMat.mul(self.diag_spmat, (4,4), True, (1,1)), self.diag_spmat) assert_equals(BoolMat.mul(False, (1,1), self.diag_spmat, (4,4)), False) assert_equals(self.x_spmat * self.coo_spmat, self.x_spmat) assert_equals(self.x_spmat * self.empty_spmat, self.empty_spmat)
def test_mul(self): assert_equals(self.true_mat * self.true_mat, self.true_mat) assert_equals(self.true_mat * self.false_vec, self.false_vec) assert_equals(BoolMat.mul(self.false_mat, (4,4), True, (1,1)), self.false_mat) assert_equals(BoolMat.mul(False, (1,1), self.true_mat, (4,4)), False) assert_equals(self.mixed_mat * self.true_vec, self.true_vec) assert_equals(self.mixed_mat * self.mixed_mat, self.mixed_mat)