Documentation Set for Swarm 2.2
Prev | Reference V. Random Library | Next

# UniformIntegerDist

## Name

UniformIntegerDist -- Uniform Integer Distribution

## Description

A generator of integral values uniformly distributed across a closed interval [min,max]. (The interval includes both its endpoints.) Setting minValue == maxValue is allowed (and returns minValue).

## Protocols adopted by UniformIntegerDist

IntegerDistribution CREATABLE

## Methods

### Phase: Creating

- + create: (id <Zone>)aZone setGenerator: (id <SplitRandomGenerator>)splitGenerator setVirtualGenerator: (unsigned)vGen setIntegerMin: (int)minValue setMax: (int)maxValue
  Use this create message if the generator to be attached is a Split one:

- + create: (id <Zone>)aZone setGenerator: (id <SimpleRandomGenerator>)simpleGenerator setIntegerMin: (int)minValue setMax: (int)maxValue
  Use this create message if the generator to be attached is a Simple one:

### Phase: Setting

- - setIntegerMin: (int)minValue setMax: (int)maxValue
  The setIntegerMin:setMax: method sets the minimum and maximum integer values to be returned

### Phase: Using

- - (int)getIntegerWithMin: (int)minValue withMax: (int)maxValue
  The getIntegerWithMin:withMax: returns an integer within the interval [min, max].

- - (int)getIntegerMax
  The getIntegerMax method returns the maximum integer value.

- - (int)getIntegerMin
  The getIntegerMin method returns the minimum integer value.

Prev | Home | Next
UniformDoubleDist | Up | UniformUnsignedDist