finished - 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


combstruct

  

iterstructs

  

create an iterator for a specified structure

  

nextstruct

  

produce the next structure

  

finished

  

return true when the last structure is produced

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

iterstructs(struct(args), size=n)

nextstruct(it)

finished(it)

Parameters

struct

-

one of a predefined list of available structures

args

-

argument list that corresponds to the structure struct

n

-

(optional) non-negative integer specifying the size of the object or the string 'allsizes' when the object should be selected from all possible sizes

it

-

iterator returned by a call to iterstructs

Description

• 

The iterstructs function returns an iterator in the form of a table. The nextstruct and finished functions are used to manipulate this table. The table entry nextvalue is a procedure created to traverse the elements defined by struct(args) of size n. The finished entry is a flag that is set to true when the last structure is produced.

• 

The nextstruct command returns the next structure from the iterator defined by the call to iterstructs.

• 

The finished function returns true when the last structure is produced.

• 

If the size is not specified, the default size for that structure is used.

• 

To list all the structures at once, see combstruct[allstructs].

  

For a list of available structures, see combstruct[structures].

Examples

withcombstruct:

allpiterstructsPermutationa,b,c:

whilenotfinishedallpdonextstructallpenddo

a,b,c

b,a,c

c,a,b

a,c,b

b,c,a

c,b,a

(1)

See Also

combstruct

combstruct[allstructs]

combstruct[structures]