Oolite 1.91.0.7668-250429-8542c40
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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 73 of file OOProbabilitySet.h.

Method Documentation

◆ copyWithZone:

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

Reimplemented from OOProbabilitySet.

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 756 of file OOProbabilitySet.m.

756{
757 return [[OOProbabilitySet allocWithZone:zone] initWithPropertyListRepresentation:[self propertyListRepresentation]];
758}
759

References OOProbabilitySet::propertyListRepresentation.

+ Here is the call graph for this function:

◆ init

- (id) init
implementation

Reimplemented from OOProbabilitySet.

Definition at line 732 of file OOProbabilitySet.m.

732{
733 NSZone *zone = [self zone];
734 [self release];
735 return [[OOConcreteMutableProbabilitySet allocWithZone:zone] initPriv];
736}
737

◆ initWithObjects:weights:count:

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

Reimplemented from OOProbabilitySet.

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 740 of file OOProbabilitySet.m.

740{
741 NSZone *zone = [self zone];
742 [self release];
743 return [[OOConcreteMutableProbabilitySet allocWithZone:zone] initWithObjects:objects weights:weights count:count];
744}
745

◆ initWithPropertyListRepresentation:

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

Reimplemented from OOProbabilitySet.

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 748 of file OOProbabilitySet.m.

748{
749 NSZone *zone = [self zone];
750 [self release];
751 return [[OOConcreteMutableProbabilitySet allocWithZone:zone] initWithPropertyListRepresentation:plist];
752}
753

◆ probabilitySet

+ (id) probabilitySet
implementation

Reimplemented from OOProbabilitySet.

Definition at line 726 of file OOProbabilitySet.m.

726{
727 return [[[OOConcreteMutableProbabilitySet alloc] initPriv] autorelease];
728}
729

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

+ Here is the caller graph for this function:

◆ removeObject:

- (void) removeObject: (id) object

Reimplemented in OOConcreteMutableProbabilitySet.

Definition at line 768 of file OOProbabilitySet.m.

768{
770}
771
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 762 of file OOProbabilitySet.m.

762{
764}
765

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: