English 中文(简体)
采用什么共同方法在代码中采用共同的白皮书数学语系
原标题:What are common approaches for implementing common white paper math idioms in code

我正在寻找一种资源, 来解释白皮书中常见的数学操作, 使数学背景极少的编码员能够理解 编译语句, 用于循环等。

在不同的方程式中,我经常看到同样的符号,这往往导致容易理解的算法。 对这些符号的含义的概述将大大有助于使学术论文更加容易理解。

最佳回答

只有那些我能够想到的不明显(电算函数、三角函数等),并且在代码中具有直接等同的代码是总和、和产品

例如 是:

 sum = 0;
 for (i = 0; i < len(a); ++i) sum += a[i];

以及一些相关细节:下标(线下小号)通常与数组索引相同(因此, > i 可能写得小,下面和 a 右侧)。 类似地, 值的范围(这里是 0 a 的长度)可以作为两个小数字,仅以右侧(起始值、 0 ,底值、终点值、 n ,顶端)为两个小数字。

等效产品为 :

product = 1;
for (i = 0; i < len(a); ++i) product *= a[i];

批注 xan 中的 < em> 更新 也表示覆盖矩阵。 这些矩阵变得复杂, 但最简单的时候你可能会看到类似 :

a[i] = M[i][j] b[j]

(如上所述, i j 更有可能是下标)。

for (i = 0; i < len(a); ++i) {
    a[i] = 0;
    for (j = 0; j < len(b); ++j) a[i] += M[i][j] * b[j]
}

更糟糕的是,往往会简单地以 a = M b 的形式写成,而你预期自己会填满所有的东西。...

更新2 以下引用的文件是 w(s[i],0)= alpha[d] * 大小(s[i])

double Size(struct s) { ... }

double w(struct s, int x) {
    if (x == 0) return alpha[d] * Size(s);
    ...
}

其它术语具有相似的外观外观, 但实际上并不复杂函数调用和乘法。 注意 < code_...\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

问题回答

我经常使用这个网站 进行复杂的数学操作 转换成代码,我从来没有高中毕业

http://www.wolframalpha.com/

“ 共同数学操作” 取决于您习惯于解决的各类问题。 它们可以从简单的算术( +, -, *, /) 到微积分( 整体、 总和、 衍生物、 部分差异方程、 母体等) 等一系列问题 。

"常识"对你和你的发展团队意味着什么?





相关问题
How to add/merge several Big O s into one

If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Enumerating All Minimal Directed Cycles Of A Directed Graph

I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...