O'Reilly logo

C Interfaces and Implementations: Techniques for Creating Reusable Software by David R. Hanson - Princeton University

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Sets

A set is an unordered collection of distinct members. The basic operations on a set are testing for membership, adding members, and removing members. Other operations include set union, intersection, difference, and symmetric difference. Given two sets s and t, the union s + t is a set that contains everything in s and everything in t; the intersection s * t is the set whose members appear in both s and t, the difference s - t is the set whose members appear in s but not in t, and the symmetric difference, often written as s / t, is the set whose members appear in only one of s or t.

Sets are usually described in terms of a universe — the set of all possible members. For example, sets of characters are usually associated with the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required