Set union
Set union is the operation that produces a set containing every element belonging to at least one of its operand sets.
Modern C, Third Edition
Set union is the operation producing a set containing every element that belongs to either operand set.
- How it is used
- Uses set union to model combined membership and to update C bit sets or flag collections.
- How deep it goes
- Explains the set interpretation of bits, computes a worked union, and distinguishes union from related bitwise operations.
- Examples
- Uses A = 240 and B = 287, a bitwise-operator table, and corvid flock flags.
- What you can do after
- Apply it via C's | and |= operators to combine represented sets and add flags.
Geometry for Programmers
A geometric union is a Boolean set operation containing every point belonging to at least one of two or more shapes.
- How it is used
- Uses union to compose geometric shapes in SDF, voxel, and CAD modeling workflows.
- How deep it goes
- Explains geometric semantics, minimum-based SDF implementation, voxel-mask behavior, and CAD construction costs.
- Examples
- Demonstrates two overlapping circles, NumPy array minima, filled voxel pixels, and CAD curve decomposition.
- What you can do after
- Apply union via NumPy minima, Boolean voxel masks, or geometry-processing workflows while recognizing representation-specific costs.
Julia as a Second Language
union is a Julia function and set operation that returns the distinct elements occurring in any of its input collections.
- How it is used
- Uses union to combine collections while locating records that belong to either source group.
- How deep it goes
- Defines union, compares operator and function forms, and demonstrates composition, but does not examine implementation internals.
- Examples
- Uses travel-photo collections and numeric sets to demonstrate union results and nested filtering.
- What you can do after
- Apply it via Julia's union function or ∪ operator to combine collections without duplicate elements.
Secrets of the JavaScript Ninja, Second Edition
A set operation that produces a set containing every element present in either operand set.
- How it is used
- Combines collections of people into one roster without manually tracking shared members.
- How deep it goes
- Defines union and demonstrates it with array spreading and Set construction.
- Examples
- Uses ninja and samurai rosters, with Hattori appearing in both.
- What you can do after
- Apply union via JavaScript's Set constructor and spread syntax to combine arrays while retaining distinct values.
Read how Secrets of the JavaScript Ninja, Second Edition explains set union →
Also covered in
- Modern C
- Python How-To
- Python Workout: 50 ten-minute exercises
- The Well-Grounded Rubyist, Fourth Edition
- Clojure: The Essential Reference
- Agent Design PatternsIn early access (MEAP)
- The Quick Python Book, Fourth Edition
- Secrets of the JavaScript Ninja, Third EditionIn early access (MEAP)
- Grokking Algorithms, Second Edition
What to know first
- for...ofThe JavaScript for...of statement iterates over successive values produced by an iterable's iterator.
- KeyErrorKeyError is the Python exception raised when a mapping lookup requests a key that is not present.
- NoneNone is Python’s singleton object representing the absence of a value or meaningful result.
- MapA map is an associative data structure that stores key-value associations and supports retrieving values by key.
Related concepts
- setproduces · A set is a collection of distinct elements in which membership, rather than order or duplicate occurrences, defines the collection.
- set operationkind of · A set operation combines, compares, or transforms sets according to the membership of their elements.
- boolean operationkind of · A Boolean operation combines or modifies geometric regions using set-like operations such as union, intersection, and difference.
- set!uses · set! is a Clojure mutation construct that assigns a value to a mutable target such as a field or thread-local binding.
Questions about set union
What is set union?
Set union is the operation that produces a set containing every element belonging to at least one of its operand sets.
Which Manning books explain set union?
Modern C, Third Edition, Geometry for Programmers, Julia as a Second Language and Secrets of the JavaScript Ninja, Second Edition.
What should I know before learning set union?
Manning books that teach set union usually introduce for...of, KeyError, None and Map first.
What is set union a kind of?
Set union is a kind of set operation. A set operation combines, compares, or transforms sets according to the membership of their elements.
What is set union also called?
Set union is also called union operation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



