Closed tmigot closed 2 years ago
With the priority of operations, I think that g' * H
is an AbstractLinearOperator
, and multiplying by a vector returns a vector. Is this really an issue? Even if the result should be of size 1, the user might want to keep the output of the product as a vector.
Actually we could try to implement g' * H = a
which is (H' * g)' = a
.
However if the user needs g' * H
as an AbstractLinearOperator
he would have to manually create opgT = LinearOperator(g')
and then do opgT * H
.
@dpo what do you think about this?
I am not sure how to implement it. I think we should be consistent with the way matrices are working:
n = 3
g = rand(n)
H = rand(n, n)
g' * H * g # returns a Number
g' * (H * g) # returns a Number
Using
InverseLBFGSOperator
, I got the following issue: