You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/design.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,32 +68,31 @@ As well as defining the geometric algebra, the signature is used to specify basi
68
68
69
69
| Required methods | Description |
70
70
|:-----------------|:------------|
71
-
| `dimension(sig)` | The dimension of the underlying vector space, or number of basis vectors.
72
-
|`basis_vector_square(sig, i)`| The scalar square of the `i`th basis vector. |
71
+
| `canonical_signature(sig)` | Canonical representation as a tuple (e.g., `Cl(1,3)` becomes `(1,-1,-1,-1)`).
73
72
74
-
| Optional methods | Description |
75
-
|:-----------------|:------------|
76
-
| `show_signature(io, sig)` | Show the metric signature in a compact human-readable form.
77
-
| `show_basis_blade(io, sig, indices)` | Print a basis blade with the given indices (e.g., `v12` or `πββ§πβ`).
78
-
| `bits_to_indices(sig, bits)` | Define display order of indices for a basis blade (must also implement `basis_blade_parity(sig, bits)` consistently).
79
-
| `componentstype(sig, N)` | Preferred array type for `Multivector{sig}` components. (E.g., `Vector`, `MVector`, `SparseVector`, etc.)
80
-
| `use_symbolic_optim(sig)` | Whether to use symbolic code generation to optimise multivector products. (Default is true for low dimensions.)
73
+
| Optional methods | Description | Default
74
+
|:-----------------|:------------|:-------
75
+
| `dimension(sig)` | The dimension of the underlying vector space | `length(canonical_signature(sig))`
76
+
| `basis_vector_square(sig, i)` | The scalar square of the `i`th basis vector | `canonical_signature(sig)[i]`
77
+
| `show_signature(io, sig)` | Print the metric signature in a compact human-readable form | `show(io, sig)`
78
+
| `show_basis_blade(io, sig, indices)` | Print a basis blade with the given indices (e.g., `v12` or `πββ§πβ`) | prints like `v12`
79
+
| `bits_to_indices(sig, bits)` | Define the order of indices for a basis blade (must also implement `basis_blade_parity(sig, bits)` consistently) | always increasing like `v123`
80
+
| `componentstype(sig, N)` | Preferred array type for `Multivector{sig}` components. (E.g., `Vector`, `MVector`, `SparseVector`, etc.) | `SVector` if small, `Vector` if large
81
+
| `use_symbolic_optim(sig)` | Whether to use symbolic code generation to optimise multivector products. | True for low dimensions
81
82
82
83
83
84
Below is an example of how one might define a βprojectivisedβ signature which adds a projective dimension ``π―_0`` squaring to ``-1`` to any signature:
0 commit comments