RobinHankin / clifford

https://robinhankin.github.io/clifford/
5 stars 0 forks source link

extraction #62

Closed RobinHankin closed 2 years ago

RobinHankin commented 2 years ago

Extraction methods really should take disord objects. Look:

> a <- clifford(list(1,1:2,1:3,2:3,2:5),1:5)
> a
Element of a Clifford algebra, equal to
+ 1e_1 + 2e_12 + 4e_23 + 3e_123 + 5e_2345
> a[coeffs(a)<3]
Error in is_ok_clifford(terms, coeffs) : 
  all(term_elements > 0) is not TRUE
> 

Above, a[coeffs(a)<3] has a perfectly clear meaning, consistent with the fact that the index is a disord, and the idiom should work.