variable m = new variable(); tap tm = new tap(m, "tm");
constant c3 = new constant(32, m);
add a = new add(v, m, f);
}
public static void main(String[] args)
{
variable c = new variable(); tap tc = new tap(c, "c");
variable f = new variable(); tap tf = new tap(f, "f");
cfconverter(c, f);
c.set_value(100, null);
c.reset(null);
f.set_value(32, null);
}
}
當變量 c 被設置為值 100 時,請注意計算是如何傳播直到 f 的值被報告為 212 的。此時,稱該網絡是完全受約束的。只是將 f 設置為新的值不會使該網絡計算 c。該網絡必須重置,以便松開所有約束條件。然后,我們可以設置 f 的值,以便計算 c。
完畢。
延伸閱讀
文章來源于領測軟件測試網 http://www.kjueaiud.com/