确实Excel中使用什么样的算法来重新计算公式? [英] What algorithm does Excel use to recalculate formulas?

查看:178
本文介绍了确实Excel中使用什么样的算法来重新计算公式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是公式重新$ P $然后重新计算使用设计模式psented在语法树如访问者模式?你会如何​​去再现重新计算过程中的code?

Are the formulas represented in a syntax tree then recalculated using a design pattern like the Visitor pattern? How would you go about reproducing the recalculation process in code?

推荐答案

也许,正如你所说,人们的猜测是,Excel创建了一堆的AST的,每个indipendent组电池,其中叶始发,静数据,并且节点是公式

Probably, as you say, one guess is that Excel creates a bunch of ASTs, one for each indipendent group of cells, where the leaves are the originating, static data, and the nodes are formulas.

然后,它计算的结果为每个节点,具有后订单树遍历算法。

Then it calculates the result for each node, with a post-order tree traversal algorithm.

您必须考虑到叶/节点取消,部分重新计算,ECC。如果我没有错,我读的地方,Excel中可能受益的多核处理器重新计算并行表。

You have to take into account leaf/node cancellation, partial recalculation, ecc. If I'm not wrong, I read somewhere that Excel could benefit of multicore processors to recalculate a sheet in parallel.

这篇关于确实Excel中使用什么样的算法来重新计算公式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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