create_makefile

create_makefile(target, srcprefix = nil) Instance Public methods Generates the Makefile for your extension, passing along any options and preprocessor constants that you may have generated through other methods. The target name should correspond the name of the global function name defined within your C extension, minus the Init_. For example, if your C extension is defined as Init_foo, then your target would simply be âfooâ. If any â/â characters are present in the target name, o

create_header

create_header(header = "extconf.h") Instance Public methods Generates a header file consisting of the various macro definitions generated by other methods such as #have_func and have_header. These are then wrapped in a custom #ifndef based on the header file name, which defaults to âextconf.hâ. For example: # extconf.rb require 'mkmf' have_func('realpath') have_header('sys/utime.h') create_header create_makefile('foo') The above script would generate the following extconf.h file:

convertible_int

convertible_int(type, headers = nil, opts = nil, &b) Instance Public methods Returns the convertible integer type of the given type. You may optionally specify additional headers to search in for the type. convertible means actually the same type, or typedef'd from the same type. If the type is a integer type and the convertible type is found, the following macros are passed as preprocessor constants to the compiler using the type name, in uppercase. TYPEOF_, followed by the

check_sizeof

check_sizeof(type, headers = nil, opts = "", &b) Instance Public methods Returns the size of the given type. You may optionally specify additional headers to search in for the type. If found, a macro is passed as a preprocessor constant to the compiler using the type name, in uppercase, prepended with SIZEOF_, followed by the type name, followed by =X where âXâ is the actual size. For example, if check_sizeof('mystruct') returned 12, then the SIZEOF_MYSTRUCT=12 preprocessor ma

check_signedness

check_signedness(type, headers = nil, opts = nil, &b) Instance Public methods Returns the signedness of the given type. You may optionally specify additional headers to search in for the type. If the type is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the type name, in uppercase, prepended with SIGNEDNESS_OF_, followed by the type name, followed by =X where âXâ is positive integer if the type is unsigned and a negative intege

header

header() Instance Public methods

body

body() Instance Public methods

new 2

new(f) Class Public methods

new

new(f) Class Public methods

lusolve

lusolve(a,b,ps,zero=0.0) Instance Public methods Solves a*x = b for x, using LU decomposition. a is a matrix, b is a constant vector, x is the solution vector. ps is the pivot, a vector which indicates the permutation of rows performed during LU decomposition.