Last active
September 17, 2015 10:39
-
-
Save Wendly/73d6552df00fdf7ac1e7 to your computer and use it in GitHub Desktop.
差分方程式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x(i) = x(i - 1) + x(i - 2) | |
現況 | |
private i = 2; | |
private int[] x = new int[i + 1]; | |
void func() { | |
x[i] = x[i - 1] + x[i - 2]; | |
//update buffer | |
x[i - 2] = x[i - 1]; //x[1] <= x(i - 2) | |
x[i - 1] = x[i]; //x[0] <= x(i - 1) | |
} | |
期望 | |
private int x; | |
void func() { | |
x(i) = x(i - 1) + x(i - 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment