aidemaple

aidemaple

factory aidemaple

Description:
  • Specifies standard Maple functions to preprocess source code, graphic and formula.

    • These function are availble when using Maple with the dedicathed $include<…> directive.

Methods

(static) maple2h(filename, what, declareopt)

Description:
  • This Maple function generates a class instance pure function from maple code.

    • This function:
      • Offers a standardized way to include maple generated codem, in a .h directory.
      • Alerts that this is a generated file not to edit.
      • Avoids the maple CodeGeneration file addendum caveat (using append instead of write), and spurious #include at the code generation level.
      • Allows one to generate const class instance function, as expected.
      • Provides generic variadic boolean functions And() and Or(), in order to manipulate boolean expression:
        • The caveat is that and expression like x = 0 and 1 = 1 is evaluated to false at the maple level.
    • Usage example:
      • At the maple level:
    $include <maple2h.mpl>
    maple2h("myfunction", expression_or_function, [variable:: type, …]):
    
    • At the C/C++ level:
    #include "maple2h.hpp" // In order to get the And() and Or() functions defined.
    
    class MyClass {
    ../..
    #include ".h/myfunction.h" // In order to have `myfunction` defined as an instance function.
    ../..
    }
    
Parameters:
Name Type Attributes Description
filename string

The filename without the .h extension.

what expression_array_or_function

What to translate in C/C++ code.

declare list <optional>

The maple CodeGeneration declare option, e.g.: [x:: integer, i:: float].

(static) maple2jpg(filename, …what)

Description:
  • This Maple function generates a jpeg plot file.

    • This function:
      • Manages the plotsetup to make a plot.
    • Usage example:
      • At the maple level:
    $include <maple2jpg.mpl>
    maple2jpg("myjpg", what…):
    
Parameters:
Name Type Attributes Description
filename string

The filename without the .jpg extension.

what plot_command_and_options <repeatable>

The plot command elements.

  • The plot3d element means using the plot3d instead of the plot command.
  • The `plotoptions="width=…,height=…,…" element is passed to the plotsetup.

(static) maple2latex()

Description:
  • There is no aide specific Maple function but the standard latex function is to be used.

    • Please refer to the latex function provided by Maple.
    • The maple2latex.mpl exists and is used as an example to develop other aidemaple function.