Access specific coefficents of a Clifford object using a list of terms.
Usage
getcoeffs(C, B)
const(C,drop=TRUE)
# S3 method for clifford
const(x) <- value
Arguments
C,x
Clifford object
B
List of terms
value
Replacement value
drop
Boolean, with default TRUE meaning to return the
constant coerced to numeric, and FALSE meaning to return a
(constant) Clifford object
Details
Extractor method for specific terms. Function const() returns
the constant element of a Clifford object. Note that const(C)
returns the same as grade(C,0), but is faster.
The slightly awkward R idiom in const<-() is to ensure numerical
accuracy; see examples.
# NOT RUN {X <- clifford(list(1,1:2,1:3,3:5),6:9)
getcoeffs(X,1:2)
X <- X+1e300const(X) # should be 1e300const(X) <- 0.6const(X) # should be 0.6, no numerical error# }