Closed RobinHankin closed 3 years ago
Note that function kform()
can take a k-tensor, but:
> a <- as.ktensor(matrix(c(1,2,7,1,6,4,1,1,4,3,3,3),byrow=T,ncol=3),1:4)
> a
A linear map from V^3 to R with V=R^7:
val
3 3 3 = 4
1 1 4 = 3
1 6 4 = 2
1 2 7 = 1
> as.function(Alt(a))(V)
[1] -0.2330575
> as.function(kform(a))(V)/6
[1] -0.2330575
>
Everything is working as intended but what we need is for Alt(a,give_kform=TRUE)
to return kform(Alt(a))/6
Currently, given a k-tensor, function
Alt()
returns another k-tensor which is guaranteed to be alternating. It would be nice forAlt()
to take an argument to return a k-form instead. Look:In the above, it is clear that objects
KT
andKF
are identical functions, but currently there is no nice package idiom to convertKT
toKF
. Maybe adding argumentgive_kform
toAlt()
would be good.