set

Section: OATH Reference Manual (3O)
Updated: 26 August 1991
Index Return to Main Contents
 

NAME

set (setA, setG) - a collection of unique objs  

SYNOPSIS

#include <oath/set.h>  

DESCRIPTION

The set is a bag of unique objs -- insertion of an obj that is already in the set has no effect. As with any bag, the set may be a "filter", allowing some objs to "fall through". In set terminology, if an obj is inserted into a set but is not in the set's domain, then nothing happens.  

DERIVATION

set : bag : obj

set is an abstract type.  

STATIC OPERATIONS

setA setA:: isa (objA)
setA::isa(O) returns O if it is truly a set; otherwise it returns Nil.
 

MEMBER OPERATIONS

setA setA:: insert (objA)
S.insert(O) is further defined from bagA::insert to insert obj O into set S only if O belongs in S and is not already present in S.
setA setA:: append (setA)
S1.append(S2) is further defined from bagA::append to use the above insert semantics. Note that this is set union.
setA setA:: remove (objA)
S.remove(O) removes obj O from set S.
setA setA:: operator -= (objA)
S -= O is the same as S.remove(O).
setA setA:: subtract (setA)
S1.subtract(S2) removes each obj in set S2 from set S1.
setA setA:: operator -= (setA)
S1 -= S2 is the same as S1.subtract(S2).
setA setA:: operator - (setA)
S1 - S2 is the same as (+S1) -= S2.
setA setA:: intersect (setA)
S1.intersect(S2) removes each obj from set S1 that is not also in set S2.
setA setA:: operator &= (setA)
S1 &= S2 is the same as S1.intersect(S2).
setA setA:: operator & (setA)
S1 & S2 is the same as (+S1) &= S2.
 

INTERNAL OPERATIONS

virtual void setG:: remove (const objG*)
virtual void setG:: subtract (const setG*)
virtual void setG:: intersect (const setG*)
 

SEE ALSO

OATH(3O), bag(3O), obj(3O)  

AUTHOR

Brian M. Kennedy (Computer Science Center, Texas Instruments Incorporated)  

BUGS


 

Index

NAME
SYNOPSIS
DESCRIPTION
DERIVATION
STATIC OPERATIONS
MEMBER OPERATIONS
INTERNAL OPERATIONS
SEE ALSO
AUTHOR
BUGS

This document was created by man2html, using the manual pages.
Time: 20:37:44 GMT, July 24, 2024