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

Generate Musical Isomorphisms by Default #269

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

lukem12345
Copy link
Member

DiagrammaticEquations PR 67 added support for inferring variables as vector fields and resolving the musical isomorphism functions.

This PR updates our docs pages and internal simulation generation to accommodate this new feature.

A future PR should manage the pre-allocation of vectors of SVectors in an autodiffcache-able way.

@GeorgeR227 assisted in this feature.

@@ -5,6 +5,30 @@ using Krylov
using LinearAlgebra
using SparseArrays

# Define mappings for default DEC operations that are not optimizable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by optimizable do you mean able to be represented by a sparse matrix? The function below is called default_dec_matrix_generate, which has matrix in the name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, for example, the sharp operator is a matrix, but we do not allocate memory for their outputs.

If I recall correctly, the generic term "optimizable" as used in this code base just means that the assignment uses either .= syntax or the mul! method when being emitted.

One of the things that I tried to do is amend this state of affairs, by drawing a distinction between operators with special logic that happen to be matrices, operators with special logic that do not happen to be matrices, and operators with no special logic and we do not care if they are matrices or not

end

return (args...) -> op(args...)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the function above is just a move of this + adding the sharp and flat.

src/simulation.jl Outdated Show resolved Hide resolved
src/simulation.jl Outdated Show resolved Hide resolved
src/simulation.jl Outdated Show resolved Hide resolved
@GeorgeR227
Copy link
Collaborator

I'm realizing now that since this PR introduces the non_optimizable class of DEC operators, ones other than sharp/flat, such as dual wedges and such, should also be moved over into the regular default_dec_generate.

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

Successfully merging this pull request may close these issues.

3 participants