liveBook · Manning

Set union

Set union is the operation that produces a set containing every element belonging to at least one of its operand sets.

How 4 Manning books explain it

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.

Read how Modern C, Third Edition explains set union →

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.

Read how Geometry for Programmers explains set union →

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.

Read how Julia as a Second Language explains set union →

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 →

Related concepts

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.