阅读背景:

如何用C#中的逻辑运算符计算表达式树

来源:互联网 

I have a tree structure with leaf nodes containing expressions, which are asserted to be True or False , connected by Logical (AND/OR) conditions. I am looking for an algorithm/solution to evaluate the tree by Depth-first-search, based on logical-operators If the parent node is an AND then no further traversal to sibling is required if the current node is evaluated as false. (also if the current node is TRUE then no further sibling to be visited if the parent node is an OR) - This would optimize the evaluation.I am just curious to know if there is a solution/code already there, rather than reinventing it.I have a tree structure with leaf nodes contain




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: