-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to assign ruby complex types to GSL::Matrix::Complex (#38)
* * Added a case for `T_COMPLEX` in rb_gsl_complex_new(1..2) and rb_gsl_obj_to_gsl_complex(1) * Currently the ops on `::Complex` number is handled via rb_funcall(2..) * Added a test for creating `GSL::Complex` by passing `Complex ` type to `GSL::Complex#alloc` * There is an added cost due to the call to rb_funcall(2..) being used since the @real, @image ivars appear to be unset, in addition to this, struct RComplex is not publicly exposed and to use TypedData_Get_Struct(3) this struct would need to be replicated along with all its dependants. * Fixed a typo that led to failing tests
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters