You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
minisat という SAT ソルバの ruby バインディングを作ってみました。1.8.5 と 1.9.0 で動作確認してます。 http://dame.dyndns.org/misc/misc/ruby-minisat-1.14.0.tar.bz2 例えば という SAT 問題を解くときはこんな風にします。 require "minisat" solver = MiniSat::Solver.new # 問題定義 a = solver.new_var b = solver.new_var solver << [a, b] << [-a, b] << [a, -b] # 解の探索 p solver.solve #=> true (satisfiable) # 解の表示 p solver[a] #=> true p solver[b] #=> true リテラルの配列で表現した clau
Programming Collective Intelligence: Building Smart Web 2.0 Applications 作者: Toby Segaran出版社/メーカー: O'Reilly Media発売日: 2007/08/26メディア: ペーパーバック購入: 3人 クリック: 117回この商品を含むブログ (31件) を見る「集合知」を解説するこの本にはいろんな実例とサンプルが出てくる。サンプルは python なので ruby に書き換えてみた。書き換えたのは第二章の "Making Recommendations" の一部です。なんらかのアイテム(本とか映画とか)とその評価(Amazonレビューの★とか)を複数の人間が行った場合に,その情報を元に「似た傾向の評価者」を探し,似た傾向の評価者のリストから自分が未評価のアイテム(つまり未読の本とか未見の映画とか
Matz日記 で紹介されている google-sparsehash を眺めてみた. ひさびさに Google 気分. :~/src/sparsehash-0.8 omo$ wc `find src/google/ -type f` 253 1348 10336 src/google//dense_hash_map 237 1309 9884 src/google//dense_hash_set 238 1244 9616 src/google//sparse_hash_map 223 1214 9245 src/google//sparse_hash_set 919 4776 37957 src/google//sparsehash/densehashtable.h 42 189 1187 src/google//sparsehash/sparseconfig.h 884 4642 371
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く