RandomTools Flavor: integer - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Random Objects : RandomTools package : Flavors : RandomTools/flavor/integer

RandomTools Flavor: integer

describe a flavor of a random integer

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

integer

integer(opt)

Parameters

opt

-

equation of the form range = value; specify options for the random integer

Description

• 

The flavor integer describes a random integer in a particular range.

  

To describe a flavor of a random integer, use either integer or integer(opt) (where opt is described following) as the argument to RandomTools[Generate] or as part of a structured flavor.

• 

By default, the flavor integer describes a random integer in the range 499999999994..499999999994, inclusive.

• 

You can modify the properties of the random integer by using the integer(opt) form of this flavor. The opt argument can contain the following equation.

  

 

  

range = a..b

  

This option specifies the range from which the random integer is chosen.

  

The endpoints must be of type integer and they describe a random integer in the interval a..b, inclusive.

  

If the left-hand endpoint of the range is greater than the right-hand endpoint, an exception is raised.

Examples

withRandomTools:

Generateinteger

104281139460

(1)

Generateintegerrange=2..7

3

(2)

seqGenerateinteger,i=1..10

306860183579,477575829529,300187484465,72447943125,342622684448,87713714154,496417214186,113591692544,194607189271,273012980029

(3)

Generatelistintegerrange=5..5,10

5,3,3,4,4,5,2,4,3,5

(4)

Matrix3,3,Generateintegerrange=2..7identicalx+integerrange=2..7,makeproc=true

2x+76x+75x+47x+64x+65x+43x+42x+24x+6

(5)

See Also

flavor/structured

integer

rand

RandomTools

RandomTools[Generate]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam