C++ sets class 1.0
You can use the sets class to perform set operations in your programs.
|
You can use the sets class to perform set operations in your programs. It represents set elements as bits in a private array of unsigned long integers. The array size is a defined constant which can be changed to suit your application.
The sets class supports the following set operations by means of C++ operator overloading:
union
The union of two sets A, B is the set of all elements which belong to either A or B. In the sets class, the symbol + is the binary union operator:
A + B = {x: x is in A -or- x is in B }
intersection
The intersection of two sets A, B is the set of all elements which belong to both A and B. The symbol * is the binary intersection operator:
A * B = {x: x is in A -and- x is in B }
example
Let A = {1, 2, 3, 4} and B = {3, 4, 5, 6}. Then
A + B = {1, 2, 3, 4, 5, 6}
A * B = {3, 4}
complement
In set theory, sets are subsets of a fixed universal set U. In the sets class, U is the set of elements numbered from 1 to MAX_WORDS * WORD_SIZE. In the class declaration file below, the following definitions are made:
#define MAX_WORDS 2
#define WORD_SIZE ( 8 * sizeof( unsigned long ) )
These parameters make the range of U, 1 to 64 in sets. To increase or decrease the size of U, change the defined value of MAX_WORDS.
The complement of set A is the set of elements belonging to U but not belonging to A. The symbol ~ is the unary complement operator:
~A = {x: x is in U, x is not in A }
example
Let A = {1, 2, 3, 4} and B = {3, 4, 5, 6}. Then
~A = {5, 6, 7, . . .}
~B = {1, 2, 7, 8, 9, . . .}
difference
The difference of two sets A, B is the set of all elements which belong to A less those in B. The symbol - is the binary difference operator:
A - B = {x: x is in A, x is not in B}
example
Let A = {1, 2, 3, 4} and B = {3, 4, 5, 6}. Then
A - B = {1, 2}
It can be shown that A - B = A * ~B.
symmetric difference
The symmetric difference of two sets A, B is the set of all elements which belong to A or to B, but not both.
Requirements
tags
the set all elements the sets which belong the symbol elements which sets class two sets max words example let the binary difference the symmetric difference

Download C++ sets class 1.0
Authors software
Numerical Plotter 1.0
Abecedarical Systems
This source code will enable you to plot the solutions to scientific and engineering problems.
Simulated Annealing Demonstration 1.0
Abecedarical Systems
This is a Java application that will demonstrate the Simulated Annealing algorithm with an attack on the "traveling salesman" problem.
C++ sets class 1.0
Abecedarical Systems
You can use the sets class to perform set operations in your programs.
Xref 1.0
Abecedarical Systems
Xref is a utility application which creates a file containing the locations of identifiers used in your C and C++ programs.
Similar software
C++ sets class 1.0
Abecedarical Systems
You can use the sets class to perform set operations in your programs.
FractionCalc 1.3.3
Travis East
FractionCalc will perform standard operations on fractions, improper fractions, or mixed numbers.
Shade LSB 1.0.0
Brandon Captain
Shade is an acronym which stands for Steganographically Hide and Analyze Data Entries.
Formulas 3.0
Windowmaker Software
Formulas can be used to perform simple math operations.
BITS Download Manager 1.2
Language.Nu
BITS is an application that enables you to download large files in the background.
AXARScan 4.1 r1
AXAR Team
AXARScan application represents hexadecimal text editor.
Free Calculator 1.0
Academy-info
Free Calculator is a useful calculator that can perform any of the standard operations for which you would normally use a handheld calculator.
CKRename 1.08
Pat Hall
CKRename is a handy tool you can use to perform batch file renaming operations.
Flash Calc 1.3
Tomoyasu Kato
Flash Calc application represents a flash mental calculation software.
AlgoDraw 2.20
XWare
AlgoDraw represents a simple tool for drawing flowcharts.
Other software in this category
File Analyzer 1.6 12.10.2002
Vadim Tarasov
File Analyzer is a software application that can identify the format of a file, with what it was compiled, encrypted, packed, etc.
Snap 1.1
Fritz
This program is a multiplatform (9x,ME,NT4) Task/Window manager and MORE.
FileType v1.26
X-Fixer
FileType is intended to give the "first-look" file type information without any futher details.
CodeSnip 1.0
Dacris Software
CodeSnip helps you to increase your daily coding efficiency.
ExamDiff 1.6m
PrestoSoft
ExamDiff is a useful utility for visual file comparison.