evalBoolean - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Relation.evalBoolean

evaluate a relation to a Boolean value

 

Calling Sequence

Description

Examples

Compatibility

Calling Sequence

Algebraic evalBoolean() throws MapleException

Description

• 

The evalBoolean method evaluates the associated Relation object to a true or false value.

Examples

import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class Example

{

    public static void main( String notused[] ) throws MapleException

    {

        String[] mapleArgs = { "java" };

        Engine engine = new Engine( mapleArgs, new EngineCallBacksDefault(), null, null );

        Relation rel;

        try

        {

            rel = (Relation)engine.evaluate( "2*x + 3*y <= 5:" );

            System.out.println( rel.evalBoolean() );

            rel = (Relation)engine.evaluate( "2 + 3 > 0:" );

            System.out.println( rel.evalBoolean() );

        }

        catch ( MapleException me )

        {

            System.out.println( me.getMessage() );

        }

    }

}

Executing this code produces the following output.

false

true

Compatibility

• 

The Relation.evalBoolean command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/API

OpenMaple/Java/Relation

 


Download Help Document