bookCollapseSection | weight | draft | title |
---|---|---|---|
true |
6 |
false |
Algebra |
The quadrille algebra provides a suite of static methods for applying logical operations to quadrille
instances. Inspired by constructive solid geometry and boolean algebra, these methods combine and manipulate quadrilles, leading to new quadrilles as an aggregation of others.
- [neg(q, value)]({{< relref "neg" >}}): Performs a logical NOT operation, inverting empty and non-empty cells, filling empty cells with a provided
value
. - [or(q1, q2, row, col)]({{< relref "or" >}}): Combines two quadrilles using a logical OR, merging their non-empty cells into a new quadrille.
- [xor(q1, q2, row, col)]({{< relref "xor" >}}): Returns a new quadrille containing all the non-empty cells that appear in either
q1
orq2
but not in both. - [and(q1, q2, row, col)]({{< relref "and" >}}): Returns a new quadrille containing only the cells that are non-empty in both
q1
andq2
. - [diff(q1, q2, row, col)]({{< relref "diff" >}}): Returns a new quadrille containing the non-empty cells from
q1
that do not appear inq2
. - [merge(q1, q2, operator, row, col)]({{< relref "merge" >}}): Returns a new quadrille by applying a specified logical
operator
to each corresponding cell ofq1
andq2
.
These algebraic methods offer powerful tools for composing quadrilles, enabling the construction of intricate patterns, designs, or logical transformations. Whether you're combining shapes, masking cells, or creating dynamic compositions, the quadrille algebra brings structure and precision to your work.