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

Dispatch for FnType Symbolics #629

Open
jpfairbanks opened this issue Aug 4, 2024 · 0 comments
Open

Dispatch for FnType Symbolics #629

jpfairbanks opened this issue Aug 4, 2024 · 0 comments

Comments

@jpfairbanks
Copy link
Contributor

It would be really cool to have generic functions in symbolic expressions. Can you overload promote_symype to get that behavior? In my case I have a bunch of functions indexed by a dimension. So I have

abstract type Form <: Number end
struct Form0 <: Form end
struct Form1 <: Form end
struct Form2 <: Form end

d_0(::Form0)::Form1
d_1(::Form1)::Form2
d_2(::Form2)::Form3

and I would like to use d(::Form)::Form to declare all of them and then tell promote symtype the fact that you have to increment the dimension. Is that possible?

Multiple dispatch would also be nice, but could be avoided.

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

1 participant