タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

C++とalgorithmに関するhirokistのブックマーク (1)

  • ウェーブレット木を試す - Negative/Positive Thinking

    はじめに 巨大な文字列でも高速にクエリ処理できる噂の木を、挙動を確認するため作ってみた。 コード アルファベット(a〜z)の文字列を扱う場合 完備辞書の操作が愚直、ビット列がvector を参考にしたけど、2か所間違ってる? #include <iostream> #include <vector> #include <queue> #include <cmath> //top_kのためのタプル struct ST { int t; size_t st, en; ST(int t, size_t st, size_t en):t(t),st(st),en(en){} }; bool operator<(const ST& a, const ST& b){ return (a.en-a.st) < (b.en-b.st); } //アルファベット([a-z]+)用のウェーブレット木 cla

    ウェーブレット木を試す - Negative/Positive Thinking
  • 1