Algebraic.eval - evaluate an Algebraic expression
|
Calling Sequence
|
|
Algebraic eval() throws MapleException
|
|
Description
|
|
•
|
The eval function evaluates the Maple expression represented by the current Algebraic object and returns the result as a new Algebraic.
|
•
|
The current Algebraic object is unchanged by this call.
|
|
|
Examples
|
|
import com.maplesoft.openmaple.*;
|
import com.maplesoft.externalcall.MapleException;
|
class Example
|
{
|
public static void main( String notused[] ) throws MapleException
|
{
|
String mapleArgs[];
|
Engine engine;
|
Algebraic a1, a2;
|
mapleArgs = new String[1];
|
mapleArgs[0] = "java";
|
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
|
null, null );
|
a1 = engine.evaluate( "''int''(x,x):" );
|
a2 = a1.eval( );
|
System.out.println( "a1 = "+a1 );
|
System.out.println( "a2 = "+a2 );
|
}
|
}
|
|
|
Executing this code should produce the following output.
a1 = int(x,x)
|
a2 = 1/2*x^2
|
|
|
|
|
Download Help Document
Was this information helpful?