Learn R Programming

clifford (version 1.0-2)

clifford: Create, coerce, and test for clifford objects

Description

A clifford object is a member of a Clifford algebra. These objects may be added and multiplied, and have various applications in physics and mathematics.

Usage

clifford(terms, coeffs=1)
is_ok_clifford(terms, coeffs)
as.clifford(x)
is.clifford(x)
nbits(x)
nterms(x)

Arguments

terms

A list of integer vectors with strictly increasing entries corresponding to the basis vectors of the underlying vector space

coeffs

Numeric vector of coefficients

x

Object of class clifford

Details

  • Function clifford() is the formal creation mechanism for clifford objects

  • Function as.clifford() is much more user-friendly and attempts to coerce a range of input arguments to clifford form

  • Function nbits() returns the number of bits required in the low-level C routines to store the terms (this is the largest entry in the list of terms)

  • Function nterms() returns the number of terms in the expression

  • Function is_ok_clifford() is a helper function that checks for consistency of its arguments

  • Function is.term() returns TRUE if all terms of its argument have the same grade

References

Snygg 2012. “A new approach to differential geometry using Clifford's geometric algebra”. Birkhauser; Springer Science+Business.

See Also

Ops.clifford

Examples

Run this code
# NOT RUN {
(x <- clifford(list(1,2,1:4),1:3))   # Formal creation method
(y <- as.1vector(4:2))
(z <- rcliff(include.fewer=TRUE))

terms(x+100)
coeffs(z)

## Clifford objects may be added and multiplied:

x + y
x*y



## They are associative and distributive:

(x*y)*z == x*(y*z)  # should be true
x*(y+z) == x*y + x*z  # should be true


## Other forms of manipulation are included:

coeffs(z) <- 1999

# }

Run the code above in your browser using DataLab