We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, length() returns 2 when given a clifford object:
length()
> x <- rcliff() > x Element of a Clifford algebra, equal to + 4 - 3e_34 - 2e_45 - 1e_1245 + 5e_345 + 3e_16 + 1e_1346 + 2e_2346 + 4e_1256 > length(x) [1] 2 > seq_along(x) [1] 1 2 >
This is sub-optimal. The spray package has a length method and this should be implemented here, also in many other packages with similar structures.
spray
length
The text was updated successfully, but these errors were encountered:
although note that nterms() is implemented.
nterms()
Sorry, something went wrong.
Following reprex does not include the "C stack usage too close to limit" error, but:
library("clifford") a <- rcliff() a #> Element of a Clifford algebra, equal to #> + 6 - 9e_1 - 7e_125 + 3e_1245 - 2e_345 - 6e_16 - 4e_46 + 4e_146 - 1e_1356 nterms(a) #> [1] 9 length(a) #> [1] 2 length.clifford <- function(x){nterms(x)} nterms(a) length(a)
Created on 2024-01-25 with reprex v2.1.0
No branches or pull requests
Currently,
length()
returns 2 when given a clifford object:This is sub-optimal. The
spray
package has alength
method and this should be implemented here, also in many other packages with similar structures.The text was updated successfully, but these errors were encountered: