11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

to_maple_char( kv, c )to_maple_complex( kv, re, im )to_maple_complex_float( kv, re, im )to_maple_integer( kv, i )to_maple_integer64( kv, i )to_maple_float( kv, f )to_maple_name( kv, s, s_len )to_maple_null( kv )to_maple_string( kv, s, s_len )7.2 Using Compiled Code in Maple • 323ToMapleBoolean is three valued. When b is zero, it returns the Maplefalse dag. If n is -1, the Maple FAIL dag is returned. If n is non-zero(and not -1), the Maple true dag is returned.ToMapleChar returns a single character Maple string dag.ToMapleComplex converts the pair of doubles, re and im, to the Mapleexpression re + I*im, and returns this dag.ToMapleComplexFloat converts a pair of FLOAT dags to the samestructure.ToMapleExpressionSequence create and returns a Maple expressionsequence and fills it with the N algebraics, arg1, arg2, ..., argN.ToMapleName returns a Maple NAME dag with the name n. If is_globalis set to TRUE, the name is global in the Maple name space. Otherwise, ifis_global is FALSE, the name is a unique exported local.ToMapleNULL returns the Maple NULL dag (an empty EXPSEQ).ToMapleNULLPointer returns the Maple zero dag. This is the wrapperrepresentation of a NULL pointer passed to a procedure. Do not confusethis with the value returned by ToMapleNULL.ToMapleString copies the character string s to a Maple STRING dagand returns it. When using the Fortran API, the length of the given stringmust also be passed.Rectangular Table (Vector, Matrix, Array) Manipulation Rtables arethe container class of Vector, Matrix, and Array data structures inMaple. The basic access functions are as follows.ALGEB RTableCreate( MKernelVector kv, RTableSettings *s,void *pdata, M_INT *bounds );void* RTableDataBlock( MKernelVector kv, ALGEB rt );M_INT RTableNumElements( MKernelVector kv, ALGEB rt );M_INT RTableNumDimensions( MKernelVector kv, ALGEB rt );M_INT RTableLowerBound( MKernelVector kv, ALGEB rt,M_INT dim );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!