C++ sets class 1.0



Publisher Description



The sets class can be used 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.


About C++ sets class

C++ sets class is a free software published in the Other list of programs, part of Education.

This program is available in English. It was last updated on 19 March, 2024. C++ sets class is compatible with the following operating systems: Windows.

The company that develops C++ sets class is abecedarical-systems. The latest version released by its developer is 1.0. This version was rated by 8 users of our site and has an average rating of 3.6.

The download we have available for C++ sets class has a file size of 13.99 KB. Just click the green Download button above to start the downloading process. The program is listed on our website since 2001-01-15 and was downloaded 628 times. We have already checked if the download link is safe, however for your own protection we recommend that you scan the downloaded software with your antivirus. Your antivirus may detect the C++ sets class as malware if the download link is broken.

How to install C++ sets class on your Windows device:

  • Click on the Download button on our website. This will start the download from the website of the developer.
  • Once the C++ sets class is downloaded click on it to start the setup process (assuming you are on a desktop computer).
  • When the installation is finished you should be able to see and run the program.



RELATED PROGRAMS
Our Recommendations






BarCode2D-PNG


Click stars to rate this APP!

Users Rating:  
  3.6/5     8
Downloads: 628
Updated At: 2024-03-19
Publisher: abecedarical-systems
Operating System: Windows
License Type: Free