Home
last modified time | relevance | path

Searched refs:Trie (Results 1 – 25 of 58) sorted by relevance

123

/external/marisa-trie/v0_1_5/lib/marisa_alpha/
Dtrie.cc8 Trie::Trie() in Trie() function in marisa_alpha::Trie
12 void Trie::mmap(Mapper *mapper, const char *filename, in mmap()
21 void Trie::map(const void *ptr, std::size_t size) { in map()
26 void Trie::map(Mapper &mapper) { in map()
27 Trie temp; in map()
38 temp.trie_.reset(new (std::nothrow) Trie); in map()
45 void Trie::load(const char *filename, in load()
52 void Trie::fread(std::FILE *file) { in fread()
57 void Trie::read(int fd) { in read()
62 void Trie::read(std::istream &stream) { in read()
[all …]
Dtrie-inline.h10 inline std::string Trie::operator[](UInt32 key_id) const {
16 inline UInt32 Trie::operator[](const char *str) const {
20 inline UInt32 Trie::operator[](const std::string &str) const {
24 inline UInt32 Trie::lookup(const std::string &str) const { in lookup()
28 inline std::size_t Trie::find(const std::string &str, in find()
35 inline std::size_t Trie::find(const std::string &str, in find()
42 inline UInt32 Trie::find_first(const std::string &str, in find_first()
47 inline UInt32 Trie::find_last(const std::string &str, in find_last()
53 inline std::size_t Trie::find_callback(const char *str, in find_callback()
61 inline std::size_t Trie::find_callback(const char *ptr, std::size_t length, in find_callback()
[all …]
Dtrie-search.cc42 std::string Trie::restore(UInt32 key_id) const { in restore()
50 void Trie::restore(UInt32 key_id, std::string *key) const { in restore()
57 std::size_t Trie::restore(UInt32 key_id, char *key_buf, in restore()
66 UInt32 Trie::lookup(const char *str) const { in lookup()
72 UInt32 Trie::lookup(const char *ptr, std::size_t length) const { in lookup()
79 std::size_t Trie::find(const char *str, in find()
88 std::size_t Trie::find(const char *ptr, std::size_t length, in find()
98 std::size_t Trie::find(const char *str, in find()
107 std::size_t Trie::find(const char *ptr, std::size_t length, in find()
117 UInt32 Trie::find_first(const char *str, in find_first()
[all …]
Dtrie-build.cc11 void Trie::build(const char * const *keys, std::size_t num_keys, in build()
36 void Trie::build(const std::vector<std::string> &keys, in build()
49 void Trie::build(const std::vector<std::pair<std::string, double> > &keys, in build()
63 void Trie::build_trie(Vector<Key<String> > &keys, in build_trie()
80 void Trie::build_trie(Vector<Key<String> > &keys, in build_trie()
82 Trie temp; in build_trie()
129 void Trie::build_trie(Vector<Key<T> > &keys, in build_trie()
173 void Trie::build_cur(Vector<Key<T> > &keys, in build_cur()
274 void Trie::build_next(Vector<Key<String> > &keys, in build_next()
292 trie_.reset(new (std::nothrow) Trie); in build_next()
[all …]
/external/marisa-trie/lib/marisa/
Dtrie.cc8 Trie::Trie() in Trie() function in marisa::Trie
12 void Trie::mmap(Mapper *mapper, const char *filename, in mmap()
21 void Trie::map(const void *ptr, std::size_t size) { in map()
26 void Trie::map(Mapper &mapper) { in map()
27 Trie temp; in map()
38 temp.trie_.reset(new (std::nothrow) Trie); in map()
45 void Trie::load(const char *filename, in load()
52 void Trie::fread(std::FILE *file) { in fread()
57 void Trie::read(int fd) { in read()
62 void Trie::read(std::istream &stream) { in read()
[all …]
Dtrie-inline.h10 inline std::string Trie::operator[](UInt32 key_id) const {
16 inline UInt32 Trie::operator[](const char *str) const {
20 inline UInt32 Trie::operator[](const std::string &str) const {
24 inline UInt32 Trie::lookup(const std::string &str) const { in lookup()
28 inline std::size_t Trie::find(const std::string &str, in find()
35 inline std::size_t Trie::find(const std::string &str, in find()
42 inline UInt32 Trie::find_first(const std::string &str, in find_first()
47 inline UInt32 Trie::find_last(const std::string &str, in find_last()
53 inline std::size_t Trie::find_callback(const char *str, in find_callback()
61 inline std::size_t Trie::find_callback(const char *ptr, std::size_t length, in find_callback()
[all …]
Dtrie-search.cc42 std::string Trie::restore(UInt32 key_id) const { in restore()
50 void Trie::restore(UInt32 key_id, std::string *key) const { in restore()
57 std::size_t Trie::restore(UInt32 key_id, char *key_buf, in restore()
66 UInt32 Trie::lookup(const char *str) const { in lookup()
72 UInt32 Trie::lookup(const char *ptr, std::size_t length) const { in lookup()
78 std::size_t Trie::find(const char *str, in find()
87 std::size_t Trie::find(const char *ptr, std::size_t length, in find()
96 std::size_t Trie::find(const char *str, in find()
105 std::size_t Trie::find(const char *ptr, std::size_t length, in find()
114 UInt32 Trie::find_first(const char *str, in find_first()
[all …]
Dtrie-build.cc11 void Trie::build(const char * const *keys, std::size_t num_keys, in build()
34 void Trie::build(const std::vector<std::string> &keys, in build()
46 void Trie::build(const std::vector<std::pair<std::string, double> > &keys, in build()
60 void Trie::build_trie(Vector<Key<String> > &keys, in build_trie()
71 void Trie::build_trie(Vector<Key<String> > &keys, in build_trie()
73 Trie temp; in build_trie()
120 void Trie::build_trie(Vector<Key<T> > &keys, in build_trie()
164 void Trie::build_cur(Vector<Key<T> > &keys, in build_cur()
260 void Trie::build_next(Vector<Key<String> > &keys, in build_next()
278 trie_.reset(new (std::nothrow) Trie); in build_next()
[all …]
/external/owasp/sanitizer/src/main/org/owasp/html/
DTrie.java44 final class Trie { class
46 private final Trie[] children;
53 public Trie(Map<String, Integer> elements) { in Trie() method in Trie
57 private Trie(List<Map.Entry<String, Integer>> elements, int depth) { in Trie() method in Trie
69 private Trie( in Trie() method in Trie
97 this.children = new Trie[childCount]; in Trie()
105 children[childIndex++] = new Trie( in Trie()
112 children[childIndex++] = new Trie(elements, depth + 1, childStart, end); in Trie()
124 public Trie lookup(char ch) { in lookup()
135 public Trie lookup(CharSequence s) { in lookup()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DTrieIterator.java97 public TrieIterator(Trie trie) in TrieIterator()
142 m_nextBlock_ = m_trie_.m_index_[0] << Trie.INDEX_STAGE_2_SHIFT_; in reset()
221 m_nextIndex_ = m_nextCodepoint_ >> Trie.INDEX_STAGE_1_SHIFT_; in calculateNextBMPElement()
286 m_trie_.m_index_[nextLead >> Trie.INDEX_STAGE_1_SHIFT_] << in calculateNextSupplementaryElement()
287 Trie.INDEX_STAGE_2_SHIFT_; in calculateNextSupplementaryElement()
316 (nextLead & Trie.INDEX_STAGE_3_MASK_))); in calculateNextSupplementaryElement()
388 Trie.INDEX_STAGE_2_SHIFT_; in checkBlock()
455 m_trie_.m_index_[nextLead >> Trie.INDEX_STAGE_1_SHIFT_] << in checkNullNextTrailIndex()
456 Trie.INDEX_STAGE_2_SHIFT_; in checkNullNextTrailIndex()
463 (nextLead & Trie.INDEX_STAGE_3_MASK_))); in checkNullNextTrailIndex()
[all …]
DTrie.java45 public abstract class Trie class
100 if (!(other instanceof Trie)) { in equals()
103 Trie othertrie = (Trie)other; in equals()
144 protected Trie(ByteBuffer bytes, DataManipulate dataManipulate) in Trie() method in Trie
173 protected Trie(char index[], int options, DataManipulate dataManipulate) in Trie() method in Trie
DIntTrieBuilder.java234 Trie.DataManipulate triedatamanipulate) in serialize()
327 length = Trie.HEADER_LENGTH_ + 2*m_indexLength_; in serialize()
340 dos.writeInt(Trie.HEADER_SIGNATURE_); in serialize()
342 …int options = Trie.INDEX_STAGE_1_SHIFT_ | (Trie.INDEX_STAGE_2_SHIFT_<<Trie.HEADER_OPTIONS_INDEX_SH… in serialize()
344 options |= Trie.HEADER_OPTIONS_DATA_IS_32_BIT_; in serialize()
347 options |= Trie.HEADER_OPTIONS_LATIN1_IS_LINEAR_MASK_; in serialize()
358 int v = (m_index_[i] + m_indexLength_) >>> Trie.INDEX_STAGE_2_SHIFT_; in serialize()
370 int v = (m_index_[i]) >>> Trie.INDEX_STAGE_2_SHIFT_; in serialize()
DTrieBuilder.java39 public static final int DATA_BLOCK_LENGTH = 1 << Trie.INDEX_STAGE_1_SHIFT_;
116 protected static final int SHIFT_ = Trie.INDEX_STAGE_1_SHIFT_;
139 protected static final int MASK_ = Trie.INDEX_STAGE_3_MASK_;
147 protected static final int INDEX_SHIFT_ = Trie.INDEX_STAGE_2_SHIFT_;
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DTrieIterator.java98 public TrieIterator(Trie trie) in TrieIterator()
143 m_nextBlock_ = m_trie_.m_index_[0] << Trie.INDEX_STAGE_2_SHIFT_; in reset()
222 m_nextIndex_ = m_nextCodepoint_ >> Trie.INDEX_STAGE_1_SHIFT_; in calculateNextBMPElement()
287 m_trie_.m_index_[nextLead >> Trie.INDEX_STAGE_1_SHIFT_] << in calculateNextSupplementaryElement()
288 Trie.INDEX_STAGE_2_SHIFT_; in calculateNextSupplementaryElement()
317 (nextLead & Trie.INDEX_STAGE_3_MASK_))); in calculateNextSupplementaryElement()
389 Trie.INDEX_STAGE_2_SHIFT_; in checkBlock()
456 m_trie_.m_index_[nextLead >> Trie.INDEX_STAGE_1_SHIFT_] << in checkNullNextTrailIndex()
457 Trie.INDEX_STAGE_2_SHIFT_; in checkNullNextTrailIndex()
464 (nextLead & Trie.INDEX_STAGE_3_MASK_))); in checkNullNextTrailIndex()
[all …]
DTrie.java46 public abstract class Trie class
101 if (!(other instanceof Trie)) { in equals()
104 Trie othertrie = (Trie)other; in equals()
145 protected Trie(ByteBuffer bytes, DataManipulate dataManipulate) in Trie() method in Trie
174 protected Trie(char index[], int options, DataManipulate dataManipulate) in Trie() method in Trie
DIntTrieBuilder.java236 Trie.DataManipulate triedatamanipulate) in serialize()
329 length = Trie.HEADER_LENGTH_ + 2*m_indexLength_; in serialize()
342 dos.writeInt(Trie.HEADER_SIGNATURE_); in serialize()
344 …int options = Trie.INDEX_STAGE_1_SHIFT_ | (Trie.INDEX_STAGE_2_SHIFT_<<Trie.HEADER_OPTIONS_INDEX_SH… in serialize()
346 options |= Trie.HEADER_OPTIONS_DATA_IS_32_BIT_; in serialize()
349 options |= Trie.HEADER_OPTIONS_LATIN1_IS_LINEAR_MASK_; in serialize()
360 int v = (m_index_[i] + m_indexLength_) >>> Trie.INDEX_STAGE_2_SHIFT_; in serialize()
372 int v = (m_index_[i]) >>> Trie.INDEX_STAGE_2_SHIFT_; in serialize()
DTrieBuilder.java41 public static final int DATA_BLOCK_LENGTH = 1 << Trie.INDEX_STAGE_1_SHIFT_;
118 protected static final int SHIFT_ = Trie.INDEX_STAGE_1_SHIFT_;
141 protected static final int MASK_ = Trie.INDEX_STAGE_3_MASK_;
149 protected static final int INDEX_SHIFT_ = Trie.INDEX_STAGE_2_SHIFT_;
/external/chromium-trace/catapult/third_party/html5lib-python/html5lib/trie/
D__init__.py3 from .py import Trie as PyTrie
5 Trie = PyTrie variable
8 from .datrie import Trie as DATrie
12 Trie = DATrie variable
Ddatrie.py3 from datrie import Trie as DATrie
6 from ._base import Trie as ABCTrie
9 class Trie(ABCTrie): class
/external/marisa-trie/
Dandroid_diff.txt88 @@ -63,15 +63,9 @@ void Trie::build_trie(Vector<Key<String> > &keys,
106 void Trie::build_trie(Vector<Key<String> > &keys,
107 @@ -168,7 +162,7 @@ void Trie::build_trie(Vector<Key<T> > &keys,
110 void Trie::build_cur(Vector<Key<T> > &keys,
116 @@ -261,10 +255,6 @@ void Trie::build_cur(Vector<Key<T> > &keys,
126 void Trie::build_next(Vector<Key<String> > &keys,
358 @@ -179,7 +179,7 @@ inline bool Trie::find_child(UInt32 &node, T query,
362 -std::size_t Trie::find_callback_(T query, U callback) const try {
363 +std::size_t Trie::find_callback_(T query, U callback) const {
367 @@ -192,10 +192,6 @@ std::size_t Trie::find_callback_(T query, U callback) const try {
[all …]
/external/clang/unittests/Tooling/
DCompilationDatabaseTest.cpp184 FileMatchTrieTest() : Trie(new FakeComparator()) {} in FileMatchTrieTest()
188 return Trie.findEquivalent(Path, ES); in find()
191 FileMatchTrie Trie; member in clang::tooling::FileMatchTrieTest
196 Trie.insert("//net/path/file.cc"); in TEST_F()
197 Trie.insert("file.cc"); in TEST_F()
206 Trie.insert("//net/d/c/b.cc"); in TEST_F()
207 Trie.insert("//net/d/b/b.cc"); in TEST_F()
212 Trie.insert("//net/AA/file.cc"); in TEST_F()
217 Trie.insert("//net/Aa/file.cc"); in TEST_F()
218 Trie.insert("//net/aA/file.cc"); in TEST_F()
[all …]
/external/marisa-trie/tools/
Dmarisa-find.cc39 void find_all(const marisa::Trie &trie, const std::string &str) { in find_all()
56 void find_first(const marisa::Trie &trie, const std::string &str) { in find_first()
67 void find_last(const marisa::Trie &trie, const std::string &str) { in find_last()
88 marisa::Trie trie; in find()
Dmarisa-benchmark.cc174 marisa::Trie *trie, std::vector<marisa::UInt32> *key_ids) { in benchmark_build()
183 void benchmark_restore(const marisa::Trie &trie, in benchmark_restore()
199 void benchmark_lookup(const marisa::Trie &trie, in benchmark_lookup()
213 void benchmark_find(const marisa::Trie &trie, in benchmark_find()
229 void benchmark_predict_breadth_first(const marisa::Trie &trie, in benchmark_predict_breadth_first()
250 void benchmark_predict_depth_first(const marisa::Trie &trie, in benchmark_predict_depth_first()
273 marisa::Trie trie; in benchmark()
/external/marisa-trie/v0_1_5/tools/
Dmarisa_alpha-find.cc39 void find_all(const marisa_alpha::Trie &trie, const std::string &str) { in find_all()
56 void find_first(const marisa_alpha::Trie &trie, const std::string &str) { in find_first()
67 void find_last(const marisa_alpha::Trie &trie, const std::string &str) { in find_last()
88 marisa_alpha::Trie trie; in find()
Dmarisa_alpha-benchmark.cc174 marisa_alpha::Trie *trie, std::vector<marisa_alpha::UInt32> *key_ids) { in benchmark_build()
183 void benchmark_restore(const marisa_alpha::Trie &trie, in benchmark_restore()
199 void benchmark_lookup(const marisa_alpha::Trie &trie, in benchmark_lookup()
213 void benchmark_find(const marisa_alpha::Trie &trie, in benchmark_find()
229 void benchmark_predict_breadth_first(const marisa_alpha::Trie &trie, in benchmark_predict_breadth_first()
250 void benchmark_predict_depth_first(const marisa_alpha::Trie &trie, in benchmark_predict_depth_first()
273 marisa_alpha::Trie trie; in benchmark()

123