Concurrent Clean : Re: ExtendedArith, 小町算
[id:lethevert:20070815:p3]
コンパイルしてみたら、gmp.cのコンパイルで警告が。
#include
が不足しているみたいだ。
-
-
- -
-
ということで、小町算をリベンジしてみた。
[id:lethevert:20070718:p2]のプログラムとほとんど変わらない。Main.iclxが整数演算版で、MainR.iclxが有理数演算版。
実行時間は2倍くらいになって、2.3秒くらい。
$ diff Main.iclx MainR.iclx 1c1 < module Main --- > module MainR 4c4 < import StdBase, OptEnv --- > import StdBase, OptEnv, Rational 10c10 < |> filter (\(_,x) = x == 100) --- > |> filter (\(_,x) = x == toRational 100) 25c25 < eval NONE = \x y = x * 10 + y --- > eval NONE = \x y = x * toRational 10 + y 36c36 < calc op = calc [1] [2,3,4,5,6,7,8,9] [] op --- > calc op = calc [toRational 1] (map toRational [2,3,4,5,6,7,8,9]) [] op
Priority Queue
remove the minimumとfind the minumumが定数オーダーで、decrease keyが対数オーダーのPriority Queueのアルゴリズムについて考えている。
HeapもBinomial queueもFibonacci heapもremove the minimumが対数オーダーなんだよね。
リンクリストを使えば、remove the minimumとfind the minimumは定数オーダーだけど、decrease keyが線形だし。
あ、Skip listならいいかも。
Re: 分散関数呼び出し
http://ja.doukaku.org/45/ via [id:Gemma:20070818]
なんですかこのErlangで書けといわんばかりのお題は?
それはともかく、こういうときはWSHという選択肢もあります。
http://msdn.microsoft.com/library/ja/default.asp?url=/library/ja/script56/html/wstskSetupOfRemoteWSH.asp
Concurrent Clean : Re: 65536
[id:lethevert:20070815:p4]
修正版がリリースされたようです。
ftp://ftp.cs.ru.nl/pub/Clean/Clean22/linux/