Skip to content
New issue

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

coeffs #37

Open
blegat opened this issue May 28, 2024 · 2 comments
Open

coeffs #37

blegat opened this issue May 28, 2024 · 2 comments

Comments

@blegat
Copy link
Member

blegat commented May 28, 2024

First, I wanted to ask whether it can be renamed coefficients like it's done in MultivariatePolynomials.
But actually, I'd like to also apply the inverse, adjoint, etc... of this map.
For instance, if I have a bridge that converts a vector from one basis to the other one then the dual of that bridge will need to apply the adjoint.
Getting the ConstraintPrimal will need to apply the inverse and setting ConstraintDualStart will need to apply the inverse of the adjoint.
Maybe we could have

struct BasisChange{C,T,S} <: AbstractMatrix{C} # From Source to Target
    target::T
    source::S
end

and then coeffs becomes

Base.:*(::BasisChange, coeffs)

and coeffs! becomes

MA.operate_to!(dest, ::typeof(*), ::BasisChange, coeffs)

and we'll also have

MA.operate_to!(dest, ::typeof(*), ::Adjoint{BasisChange}, coeffs)

etc...
The change of basis of a matrix can also be

Base.:*(::BasisChange, ::Matrix, ::BasisChange)
@kalmarek
Copy link
Collaborator

absolutely!

@blegat
Copy link
Member Author

blegat commented May 28, 2024

transformation_matrix(dest, src), maybe using LinearMap.jl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants