Implemented as_matrix method in discrete_operator