Mathematica::MathLink::MathLink

A class that represents MathLink. 

StandardError::MathLinkError

represents MathLink errors.
MathLink#initialize

initializes MLENV env and make env an instance object. See also MLInitialize().

MathLink#close

closes MathLink. See also MLClose().

MathLink#activate

activates MathLink. See also MLActivates().

MathLink#open(argc, argv)

opens MathLink using some given options. it is assumed that argv is an array likes Ruby's constant ARGV. For example, you can write:

#! ruby
MathLink.new.open(ARGV.size, ARGV)
...

See also MLOpenArgv().

MathLink#put_function(name, argc)

puts a function with head given by a symbol with name and with argc arguments. See also MLPutFunction().

MathLink#put_next(type)

puts an object of the specified type. see also MLPutNext().

MathLink#put_byte_string

puts a string containing only 8-bit character codes. see also MLPutByteString().

MathLink#get_integer

gets an integer from the MathLink See also MLGetInteger().

MathLink#get_real

gets a floating-point number from the MathLink See also MLGetReal().

MathLink#get_arg_count

gets the number of arguments to a functon See also MLGetArgCount()

MathLink#check_function(name)

checks the number of the arguments of the function 'name' or return nil when 'name' is not a function or the name of the symbol does not match 'name'. See also MLCheckFunction().

MathLink#end_packet

specifies that a packet expression is complete and is ready to be sent on the specified link. See also MLEndPacket().

MathLink#get_next

goes to the next object on link and gets its type. See also MLGetNext().

MathLink#disown_symbol(symbol)

disowns memory allocated by MLGetSymbol or MLGetFunction to store the character string s corresponding to the name of a symbol. See also MLDisownSymbol().

MathLink#get_symbol

gets the name of a symbol from the MathLink connection. See also MLGetSymbol().

MathLink#disown_string(str)

disowns memory allocated by MLGetString() to store the character str See also MLDisownString().

MathLink#get_string

gets a character string from the MathLink connection See also MLGetString().

MathLink#next_packet

goes to the next packet on link and returns a constant to indicate its head. See also MLNextPacket().

MathLink#new_packet

skips to the end of the current packet on link. See also MLNewPacket().

MathLink#error

returns an error number or nil if there is no error. See also MLError().

MathLink#error_message

returns a character string describing the last error to occur on link. See also MLErrorMessage().