执行任意数学公式 [英] Execute Arbitrary Math Formulas

查看:93
本文介绍了执行任意数学公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下情况。用户从服务器请求一些数学计算

。数据和基本公式库驻留在

服务器上。现在,用户应该能够根据基本的内置公式以及用户自己创建的其他复杂公式来创建更复杂的公式

。这些公式将存储在服务器或客户端的
上,并将应用于服务器上的数据。

某些公式将只使用一次(如果它们不要工作

预期)其他人可能会经常使用。什么是解决这个问题的最佳方法?


谢谢

I have the following scenario. A user requests some math calculations
from a server. The data and a library of basic formulas reside on the
server. Now the user should be able to create more complex formulas
based on the basic built in formulas as well as other complex formulas
that the user created himself. These formulas will be either stored on
the server or client and will be applied to the data on the server.
Some of the formulas will be used only once (if they don''t work as
expected) wheras others might get used on a frequent basis. What is the
best way to approach this problem?

Thanks

推荐答案

不知道这是否有用。

http://www.codeguru.com/csharp/cshar...cle.php/c4245/

rob写道:
Don''t know if this of any use.

http://www.codeguru.com/csharp/cshar...cle.php/c4245/
rob wrote:
我有以下场景。用户从服务器请求一些数学计算。数据和基本公式库驻留在服务器上。现在,用户应该能够基于基本的内置公式以及用户自己创建的其他复杂公式创建更复杂的公式。这些公式将存储在服务器或客户端上,并将应用于服务器上的数据。
某些公式将只使用一次(如果它们不能用作
预期)其他人可能会经常使用。什么是解决这个问题的最佳方法?

谢谢
I have the following scenario. A user requests some math calculations
from a server. The data and a library of basic formulas reside on the
server. Now the user should be able to create more complex formulas
based on the basic built in formulas as well as other complex formulas
that the user created himself. These formulas will be either stored on
the server or client and will be applied to the data on the server.
Some of the formulas will be used only once (if they don''t work as
expected) wheras others might get used on a frequent basis. What is the
best way to approach this problem?

Thanks









取决于评估公式的逻辑在哪里?如果你要

允许任意公式,你需要一个公式评估器。根据您使用的

框架,您可以在服务器或

客户端评估它们。


IMO你应该提供有关您环境的更多详细信息。


-

-

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

佛罗里达州交通部


" rob" < RM ******* @ yahoo.com>在消息中写道

news:11 ********************** @ i40g2000cwc.googlegr oups.com ...
Hi,

Depends, where the logic for evaluate the formulas reside? if you are going
to allow arbitrary formulas you need a formula evaluator. Depending of the
framework you are using you can evaluate them in the server or in the
client.

IMO you should provide more details about your environment.

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"rob" <rm*******@yahoo.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
我有以下情况。用户从服务器请求一些数学计算。数据和基本公式库驻留在服务器上。现在,用户应该能够基于基本的内置公式以及用户自己创建的其他复杂公式创建更复杂的公式。这些公式将存储在服务器或客户端上,并将应用于服务器上的数据。
某些公式将只使用一次(如果它们不能用作
预期)其他人可能会经常使用。什么是解决这个问题的最佳方法?

谢谢
I have the following scenario. A user requests some math calculations
from a server. The data and a library of basic formulas reside on the
server. Now the user should be able to create more complex formulas
based on the basic built in formulas as well as other complex formulas
that the user created himself. These formulas will be either stored on
the server or client and will be applied to the data on the server.
Some of the formulas will be used only once (if they don''t work as
expected) wheras others might get used on a frequent basis. What is the
best way to approach this problem?

Thanks



rob schrieb:
rob schrieb:
我有以下场景。用户从服务器请求一些数学计算。数据和基本公式库驻留在服务器上。现在,用户应该能够基于基本的内置公式以及用户自己创建的其他复杂公式创建更复杂的公式。这些公式将存储在服务器或客户端上,并将应用于服务器上的数据。
某些公式将只使用一次(如果它们不能用作
预期)其他人可能会经常使用。解决此问题的最佳方法是什么?
I have the following scenario. A user requests some math calculations
from a server. The data and a library of basic formulas reside on the
server. Now the user should be able to create more complex formulas
based on the basic built in formulas as well as other complex formulas
that the user created himself. These formulas will be either stored on
the server or client and will be applied to the data on the server.
Some of the formulas will be used only once (if they don''t work as
expected) wheras others might get used on a frequent basis. What is the
best way to approach this problem?



编写解析器。 Dunno如果yacc / lex可用于视觉工作室。如果没有,

得到一本关于编译器构造的书并做一个递归解析器。


很多问候!

Volker

-

对于电子邮件回复,请替换明显的。


Write a parser. Dunno if yacc/lex are available for visual studio. If not,
get a book about compiler construction and do a recursive parser.

Lots of Greetings!
Volker
--
For email replies, please substitute the obvious.


这篇关于执行任意数学公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆