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

# GammaDist

## Name

GammaDist -- Gamma distribution

## Description

A well-known continuous probability distribution returning doubles

## Protocols adopted by GammaDist

DoubleDistribution CREATABLE

## Methods

### Phase: Creating

- + create: (id <Zone>)aZone setGenerator: (id <SplitRandomGenerator>)splitGenerator setVirtualGenerator: (unsigned)vGen setAlpha: (double)alpha setBeta: (double)beta
  Use this create message if the generator to be attached is a Split one:

- + create: (id <Zone>)aZone setGenerator: (id <SimpleRandomGenerator>)simpleGenerator setAlpha: (double)alpha setBeta: (double)beta
  Use this create message if the generator to be attached is a Simple one:

### Phase: Setting

- - setAlpha: (double)alpha setBeta: (double)beta
  The setAlpha:setBeta: method sets the alpha and beta values for the gamma distribution.

### Phase: Using

- - (double)getSampleWithAlpha: (double)alpha withBeta: (double)beta
  The getSampleWithAlpha:withBeta: method returns a sample value from a Gamma distribution with the specified alpha and beta values.

- - (double)getBeta
  The getBeta method returns the beta value.

- - (double)getAlpha
  The getAlpha method returns the alpha value.

Prev | Home | Next
ExponentialDist | Up | IntegerDistribution