1 страниц (4 вхождений)
[Dev] How to convert Term[] to Entry - Сообщения
#1 Опубликовано: 16.08.2017 04:51:38
Hi, how can I convert a terms list to an entry structure? The core doc says there is a function SMath.Manager.TryFixStructure, which unfortunately doesn't seem to be available in 0.98.6398.
I also failed to find a function to convert expression strings to Entry.
Thanky you for any hint.
I also failed to find a function to convert expression strings to Entry.
Thanky you for any hint.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Опубликовано: 16.08.2017 05:21:07
You can use the static method Entry.Create(IEnumerable value)
Entry myEntry = Entry.Crate(myTermsArray);
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Martin Kraska 16.08.2017 07:14:00
#3 Опубликовано: 16.08.2017 07:26:33
Thanks, Davide,
Seems that I asked the wrong question, I misunderstood an VS error message. It was about the result type, not of the argument type of Decision.NumericCalculation. I need to see how to handle TNumber objects.
BTW, if I want to move towards Entry instead of Term[] in the function arguments, do I need to do that everywhere at once or can I do that that step by step without breaking the whole plugin?
Martin
Seems that I asked the wrong question, I misunderstood an VS error message. It was about the result type, not of the argument type of Decision.NumericCalculation. I need to see how to handle TNumber objects.
BTW, if I want to move towards Entry instead of Term[] in the function arguments, do I need to do that everywhere at once or can I do that that step by step without breaking the whole plugin?
Martin
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#4 Опубликовано: 16.08.2017 15:06:36
WroteSeems that I asked the wrong question, I misunderstood an VS error message. It was about the result type, not of the argument type of Decision.NumericCalculation. I need to see how to handle TNumber objects.
Numeric library makes really easy to handle TNumbers... some examples here (see f.e. fft2) and here (logic starts from line 360) (I'll look if I can post something compact and complete later tonight)
WroteBTW, if I want to move towards Entry instead of Term[] in the function arguments, do I need to do that everywhere at once or can I do that that step by step without breaking the whole plugin?
Absolutely, you can start implementing the IPluginLowLevelEvaluationFast instead of the IPluginLowLevelEvaluation, and convert Entry to Terms[] from where you don't are yet arrived in refactoring.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 страниц (4 вхождений)
-
Новые сообщения
-
Нет новых сообщений