@@ -186,3 +186,46 @@ VALUE cmatrix_sparse_init(VALUE self, VALUE args)
186186
187187 return self ;
188188}
189+
190+
191+ VALUE cmatrix_dense_get (VALUE self , VALUE r , VALUE c )
192+ {
193+ CDenseMatrix * this ;
194+ Data_Get_Struct (self , CDenseMatrix , this );
195+
196+ basic_struct * cresult ;
197+ VALUE result ;
198+
199+ unsigned long cbasic_r ;
200+ cbasic_r = NUM2ULONG (r );
201+ unsigned long cbasic_c ;
202+ cbasic_c = NUM2ULONG (c );
203+
204+ cresult = basic_new_heap ();
205+
206+ dense_matrix_get_basic (cresult , this , cbasic_r , cbasic_c );
207+ result = Data_Wrap_Struct (Klass_of_Basic (cresult ), NULL , basic_free_heap ,
208+ cresult );
209+ return result ;
210+ }
211+
212+ VALUE cmatrix_dense_set (VALUE self , VALUE r , VALUE c , VALUE operand )
213+ {
214+ CDenseMatrix * this ;
215+ Data_Get_Struct (self , CDenseMatrix , this );
216+
217+ basic cbasic_operand ;
218+ basic_new_stack (cbasic_operand );
219+ sympify (operand , cbasic_operand );
220+
221+ unsigned long cbasic_r ;
222+ cbasic_r = NUM2ULONG (r );
223+ unsigned long cbasic_c ;
224+ cbasic_c = NUM2ULONG (c );
225+
226+ dense_matrix_set_basic (this , cbasic_r , cbasic_c , cbasic_operand );
227+
228+ basic_free_stack (cbasic_operand );
229+
230+ return self ;
231+ }
0 commit comments