Oolite
Loading...
Searching...
No Matches
OOMutableProbabilitySet Class Reference

#include <OOProbabilitySet.h>

Inheritance diagram for OOMutableProbabilitySet:
Collaboration diagram for OOMutableProbabilitySet:

Instance Methods

(void) - setWeight:forObject:
(void) - removeObject:
(id) - init [implementation]
(id) - initWithObjects:weights:count: [implementation]
(id) - initWithPropertyListRepresentation: [implementation]
(id) - copyWithZone: [implementation]
Instance Methods inherited from OOProbabilitySet
(NSDictionary *) - propertyListRepresentation
(NSUInteger) - count
(id) - randomObject
(float) - weightForObject:
(float) - sumOfWeights
(NSArray *) - allObjects
(id) - initPriv [implementation]
(NSString *) - descriptionComponents [implementation]
(id) - mutableCopyWithZone: [implementation]
(BOOL) - containsObject:
(NSEnumerator *) - objectEnumerator
(float) - probabilityForObject:

Class Methods

(id) + probabilitySet [implementation]
Class Methods inherited from OOProbabilitySet
(id) + probabilitySetWithObjects:weights:count:
(id) + probabilitySetWithPropertyListRepresentation:

Detailed Description

Definition at line 70 of file OOProbabilitySet.h.

Method Documentation

◆ copyWithZone:

- (id) copyWithZone: (NSZone*) zone
implementation

Reimplemented from OOProbabilitySet.

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 669 of file OOProbabilitySet.m.

669 :(NSZone*)zone
670{
671 return [[OOProbabilitySet allocWithZone:zone] initWithPropertyListRepresentation:[self propertyListRepresentation]];
672}

References OOProbabilitySet::propertyListRepresentation.

Here is the call graph for this function:

◆ init

- (id) init
implementation

Reimplemented from OOProbabilitySet.

Definition at line 648 of file OOProbabilitySet.m.

649{
650 NSZone* zone = [self zone];
651 [self release];
652 return [[OOConcreteMutableProbabilitySet allocWithZone:zone] initPriv];
653}

References init.

Referenced by init.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initWithObjects:weights:count:

- (id) initWithObjects: (id*) objects
weights: (float*) weights
count: (NSUInteger) count 
implementation

Reimplemented from OOProbabilitySet.

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 655 of file OOProbabilitySet.m.

655 :(id*)objects weights:(float*)weights count:(NSUInteger)count
656{
657 NSZone* zone = [self zone];
658 [self release];
659 return [[OOConcreteMutableProbabilitySet allocWithZone:zone] initWithObjects:objects weights:weights count:count];
660}

◆ initWithPropertyListRepresentation:

- (id) initWithPropertyListRepresentation: (NSDictionary*) plist
implementation

Reimplemented from OOProbabilitySet.

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 662 of file OOProbabilitySet.m.

662 :(NSDictionary*)plist
663{
664 NSZone* zone = [self zone];
665 [self release];
666 return [[OOConcreteMutableProbabilitySet allocWithZone:zone] initWithPropertyListRepresentation:plist];
667}

◆ probabilitySet

+ (id) probabilitySet
implementation

Reimplemented from OOProbabilitySet.

Definition at line 643 of file OOProbabilitySet.m.

644{
645 return [[[OOConcreteMutableProbabilitySet alloc] initPriv] autorelease];
646}

References probabilitySet.

Referenced by OOShipRegistry(OODataLoader)::mergeShipRoles:forShipKey:intoProbabilityMap:, and probabilitySet.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeObject:

- (void) removeObject: (id) object

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 679 of file OOProbabilitySet.m.

679 :(id)object
680{
682}
static void ThrowAbstractionViolationException(id obj) GCC_ATTR((noreturn))

References ThrowAbstractionViolationException().

Referenced by Universe::randomShipKeyForRoleRespectingConditions:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWeight:forObject:

- (void) setWeight: (float) weight
forObject: (id) object 

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 674 of file OOProbabilitySet.m.

674 :(float)weight forObject:(id)object
675{
677}

References ThrowAbstractionViolationException().

Referenced by OOShipRegistry(OODataLoader)::mergeShipRoles:forShipKey:intoProbabilityMap:.

Here is the call graph for this function:
Here is the caller graph for this function:

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