Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
Algebraic.dagEquals - test the expressions represented by two Algebraics for equality
Calling Sequence
boolean dagEquals( Algebraic algeb ) throws MapleException
Parameters
algeb
-
Algebraic to compare against
Description
The dagEquals function compares the expression represented by the current Algebraic object with the expression represented by algeb. If the expressions are the same, then true is returned, otherwise false is returned.
If the current Algebraic object is not in its unique representation (see unique), then the dagEquals function returns false, even if the expressions are the same.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine kernel;
Algebraic a1, a2, a3;
mapleArgs = new String[1];
mapleArgs[0] = "java";
kernel = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
a1 = kernel.evaluate( "1:" );
a2 = kernel.evaluate( "2:" );
a3 = kernel.evaluate( "1:" );
if ( a1 == a2 || a2 == a3 || a1 == a3 )
System.out.println( "equal objects" );
}
else
System.out.println( "all java object are unequal" );
if ( a1.dagEquals( a2 ) || a2.dagEquals( a3 ) )
System.out.println( "equal dags" );
System.out.println( "the dag for 1 not equal to the dag for 2" );
if ( ! a1.dagEquals( a3 ) )
System.out.println( "unequal dags" );
Executing this code should produce the following output.
all java object are unequal
dag for 1 not equal to the dag for 2
equal dags
See Also
ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/Algebraic/unique, OpenMaple/Java/API, OpenMaple/Java/Engine/evaluate, OpenMaple/Java/memory
Download Help Document