Relation.lhs - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : Relation Class : OpenMaple/Java/Relation/lhs

Relation.lhs

return the left-hand side of the Relation object

Relation.rhs

return the right-hand side of the Relation object

 

Calling Sequence

Description

Examples

Compatibility

Calling Sequence

Algebraic lhs() throws MapleException

Algebraic rhs() throws MapleException

Description

• 

The lhs and rhs functions return the left-hand side and right-hand side, respectively, of the value represented in the Relation. The value returned is an Algebraic object.

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:" );

            rel.lhs();

            rel.rhs();

        }

        catch ( MapleException me )

        {

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

        }

    }

}

Executing this code produces the following output.

2*x + 3*y

5

Compatibility

• 

The Relation.lhs and Relation.rhs commands were 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