Documentation Set for Swarm 2.2
Prev | Reference VI. Simtools Library | Next

# NSelect

## Name

NSelect -- A class to select exactly N elements at random from a collection.

## Description

NSelect selects exactly N elements from a collection without repetition. A target collection must be provided.

## Protocols adopted by NSelect

SwarmObject CREATABLE

## Methods

### Phase: Using

- + (void)select: (int)n from: aCollection into: bCollection
  The select:from:into: method selects exactly N elements from a collection without repetition into another collection. The selection algorithm is from Knuth.

Prev | Home | Next
InFile [Deprecated] | Up | ObjectLoader [Deprecated]