Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOProbabilitySet(OOExtendedProbabilitySet) Category Reference

#include <OOProbabilitySet.h>

Instance Methods

(BOOL) - containsObject:
 
(NSEnumerator *) - objectEnumerator
 
(float) - probabilityForObject:
 

Detailed Description

Definition at line 64 of file OOProbabilitySet.h.

Method Documentation

◆ containsObject:

- (BOOL) containsObject: (id) object

Extends class OOProbabilitySet.

Definition at line 121 of file OOProbabilitySet.m.

308{
309 return [self weightForObject:object] >= 0.0f;
310}
311

◆ objectEnumerator

- (NSEnumerator *) objectEnumerator

Extends class OOProbabilitySet.

Definition at line 121 of file OOProbabilitySet.m.

314{
315 return [[self allObjects] objectEnumerator];
316}
317

◆ probabilityForObject:

- (float) probabilityForObject: (id) object

Extends class OOProbabilitySet.

Definition at line 121 of file OOProbabilitySet.m.

320{
321 float weight = [self weightForObject:object];
322 if (weight > 0) weight /= [self sumOfWeights];
323
324 return weight;
325}
326

The documentation for this category was generated from the following files: