@@ -404,6 +404,55 @@ VALUE cmatrix_dense_mul(VALUE self, VALUE operand)
404404 return result ;
405405}
406406
407+ VALUE cmatrix_dense_eq (VALUE self , VALUE operand )
408+ {
409+ CDenseMatrix * this ;
410+ Data_Get_Struct (self , CDenseMatrix , this );
411+
412+ CDenseMatrix * cresult ;
413+ VALUE result ;
414+
415+ cresult = dense_matrix_new ();
416+
417+ char * s = rb_obj_classname (operand );
418+
419+ if (strcmp (s , "SymEngine::DenseMatrix" ) == 0 ) {
420+ CDenseMatrix * coperand ;
421+ Data_Get_Struct (operand , CDenseMatrix , coperand );
422+
423+ result = dense_matrix_eq (this , coperand ) == 1 ? Qtrue : Qfalse ;
424+
425+ dense_matrix_free (coperand );
426+ } else {
427+ result = Qfalse ;
428+ }
429+ return result ;
430+ }
431+
432+ VALUE cmatrix_dense_neq (VALUE self , VALUE operand )
433+ {
434+ CDenseMatrix * this ;
435+ Data_Get_Struct (self , CDenseMatrix , this );
436+
437+ CDenseMatrix * cresult ;
438+ VALUE result ;
439+
440+ cresult = dense_matrix_new ();
441+
442+ char * s = rb_obj_classname (operand );
443+
444+ if (strcmp (s , "SymEngine::DenseMatrix" ) == 0 ) {
445+ CDenseMatrix * coperand ;
446+ Data_Get_Struct (operand , CDenseMatrix , coperand );
447+
448+ result = dense_matrix_eq (this , coperand ) == 1 ? Qfalse : Qtrue ;
449+
450+ dense_matrix_free (coperand );
451+ } else {
452+ result = Qtrue ;
453+ }
454+ return result ;
455+ }
407456
408457VALUE cmatrix_dense_LU (VALUE self )
409458{
0 commit comments