indexEntryPairs - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Table.indexEntryPairs

get list of index/entry pairs

 Calling Sequence List indexEntryPairs() throws MapleException

Description

 • The indexEntryPairs function returns a List whose elements are Relation objects, each of which corresponds with a single index/entry pair from the Table.

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 ); Table tab = (Table)engine.evaluate( "table([a=1,b=2,c=3,d=2]):" ); System.out.println( "Size of table: " + tab.numElements() ); List pairlist = tab.indexEntryPairs(); for (Algebraic elem : pairlist) { Relation pair = (Relation)elem; System.out.println( "Key: " + pair.lhs() + ", Value: " + pair.rhs() ); } }

Executing this code produces the following output.

 Size of table: 4 Key: a, Value: 1 Key: b, Value: 2 Key: c, Value: 3 Key: d, Value: 2