Description Usage Arguments Details Value Author(s) See Also Examples

Allows arithmetic operators to be used for multivariate polynomials such as addition, multiplication, integer powers, etc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
## S3 method for class 'clifford'
Ops(e1, e2)
clifford_negative(C)
geoprod(C1,C2)
clifford_times_scalar(C,x)
clifford_plus_clifford(C1,C2)
clifford_eq_clifford(C1,C2)
clifford_inverse(C)
cliffdotprod(C1,C2)
fatdot(C1,C2)
lefttick(C1,C2)
righttick(C1,C2)
wedge(C1,C2)
scalprod(C1,C2=rev(C1),drop=TRUE)
eucprod(C1,C2=C1,drop=TRUE)
maxyterm(C1,C2=as.clifford(0))
C1 %.% C2
C1 %^% C2
C1 %X% C2
C1 %star% C2
C1 % % C2
C1 %euc% C2
C1 %o% C2
C1 %_|% C2
C1 %|_% C2
``` |

`e1,e2,C,C1,C2` |
Objects of class |

`x` |
Scalar, length one numeric vector |

`drop` |
Boolean, with default |

The function `Ops.clifford()`

passes unary and binary arithmetic
operators “`+`

”, “`-`

”, “`*`

”,
“`/`

” and “`^`

” to the appropriate specialist
function.

Functions `c_foo()`

are low-level helper functions that wrap the
`C`

code; function `maxyterm()`

returns the maximum index
in the terms of its arguments.

The package has several binary operators:

Geometric product | `A*B = geoprod(A,B)` |
see PDF |

Inner product | `A %.% B = cliffdotprod(A,B)` |
see PDF |

Outer product | `A %^% B = wedge(A,B)` |
see PDF |

Fat dot product | `A %o% B = fatdot(A,B)` |
see PDF |

Left contraction | `A %_|% B = lefttick(A,B)` |
see PDF |

Right contraction | `A %|_% B = righttick(A,B)` |
see PDF |

Cross product | `A %X% B = cross(A,B)` |
see PDF |

Scalar product | `A %star% B = star(A,B)` |
see PDF |

Euclidean product | `A %euc% B = eucprod(A,B)` |
see PDF |

In R idiom, the geometric product `geoprod(.,.)`

has to be
indicated with a “`*`

” (as in `A*B`

) and so the
binary operator must be `%*%`

: we need a different idiom for
scalar product, which is why `%star%`

is used.

Because geometric product is often denoted by juxtaposition, package
idiom includes `a % % b`

for geometric product.

Function `clifford_inverse()`

is problematic as nonnull blades
always have an inverse; but function `is.blade()`

is not yet
implemented. Blades (including null blades) have a pseudoinverse, but
this is not implemented yet either.

The scalar product of two clifford objects is defined as the zero-grade component of their geometric product:

*
omitted; see PDF
*

In package idiom the scalar product is given by `A %star% B`

or
`scalprod(A,B)`

. Hestenes and Perwass both use an asterisk for
scalar product as in “*A*B*”, but in package idiom, the
asterisk is reserved for geometric product.

**Note: in the package, A*B is the geometric product**.

The Euclidean product (or Euclidean scalar product) of two clifford objects is defined as

*
omitted: see PDF
*

where *?* denotes Conjugate [as in `Conj(a)`

]. In
package idiom the Euclidean scalar product is given by
`eucprod(A,B)`

or `A %euc% B`

, both of which return
`A * Conj(B)`

.

Note that the scalar product *A\ast A* can be positive or negative
[that is, `A %star% A`

may be any sign], but the Euclidean
product is guaranteed to be non-negative [that is, `A %euc% A`

is always positive or zero].

Dorst defines the left and right contraction (Chisholm calls these the
left and right inner product) as *see PDF* and
*A\lfloor B*. See the vignette for more details.

The high-level functions documented here return an object of
`clifford`

. But don't use the low-level functions.

Robin K. S. Hankin

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ```
u <- rcliff(5)
v <- rcliff(5)
w <- rcliff(5)
u*v
u^3
u+(v+w) == (u+v)+w # should be TRUE
u*(v*w) == (u*v)*w # should be TRUE
u %^% v == (u*v-v*u)/2 # should be TRUE
# Now if x,y,z are _vectors_ we would have:
x <- as.1vector(5)
y <- as.1vector(5)
x*y == x%.%y + x%^%y # should be TRUE
x %^% y == x %^% (y + 3*x) # should be TRUE
## Inner product is "%.%" is not associative:
rcliff(5,g=2) -> x
rcliff(5,g=2) -> y
rcliff(5,g=2) -> z
x %.% (y %.% z)
(x %.% y) %.% z
## Geometric product *is* associative:
x * (y * z)
(x * y) * z
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.