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

How to extend with a custom function in c#? #115

Open
omnilogix opened this issue Oct 17, 2024 · 0 comments
Open

How to extend with a custom function in c#? #115

omnilogix opened this issue Oct 17, 2024 · 0 comments

Comments

@omnilogix
Copy link

I would like to add a ccustom function that gets evaluated when calling SymbolicExpression.Evaluate();

for instance SqFt(x, y) where I would calculate square footage from the parameters

public double SqFt(double x, double y)
{
return x * y;
}

SymbolicExpression.Parse("SqFt(23, 15)");

When using NCalc I was able to attach a delegate that would receive the function name and arguments so I could return a result.

Is there a way to do this with MathNet?

Thanks

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