prolog 找路例子程序:
=== === === === === ===
Part 1-Adding connections
Part 2-Simple Path
example
| ?- path1(a,b,P,T).
will produce the response:
T = 15
P = [a,b] ?
Part 3 - Non-repeating path
As an example, the query:
?- path2(a,h,P,T).
will succeed and may produce the bindings:
P = [a,depot,b,d,e,f,h]
T = 155
Part 4 - Generating a path below a cost threshold
As an example, the query:
?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300).
returns:
RS = [a,b,depot,c,d,e,g,f,h] ?
RS = [a,c,depot,b,d,e,g,f,h] ?
no
==================================
5 ledblink -- 跑馬燈程序
該項(xiàng)目在SDT2.51下編譯調(diào)試。最簡(jiǎn)單的demo程序,運(yùn)行后3個(gè)發(fā)光二極管輪流點(diǎn)亮。
6 timerint -- 定時(shí)器中斷demo程序
該項(xiàng)目在SDT2.51下編譯調(diào)試。將子目錄timerint拷貝到c:\ 下。
該demo程序的主程序是while空循環(huán),定時(shí)器中斷服務(wù)程序每500ms將3個(gè)LED反相。
在57600超級(jí)終端里也可以看到中斷發(fā)生時(shí)的信息。
7 uart -- 串口測(cè)試程序
該項(xiàng)目在SDT2.51下編譯調(diào)試。運(yùn)行后在57600的超級(jí)終端里等待PC鍵盤的輸入,當(dāng)按下 a 或 b 或 c 按鍵時(shí),超級(jí)終端里將顯示 You Pressed a ,You Pressed b ,You Pressed c .
This OpenNL, a library to easily construct and solve sparse linear systems.
* OpenNL is supplied with a set of built-in iterative solvers (Conjugate gradient,BICGSTAB, GMRes) and preconditioners (Jacobi, SSOR).
* OpenNL can also use other solvers (SuperLU 3.0 is supported as an OpenNL extension,MUMPS will be supported in a future version)