MCPcopy Create free account
hub / github.com/apache/arrow / Dump

Method Dump

cpp/src/arrow/util/trie.cc:51–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void Trie::Dump(const Node* node, const std::string& indent) const {
52 std::cerr << "[\"" << node->substring_ << "\"]";
53 if (node->found_index_ >= 0) {
54 std::cerr << " *";
55 }
56 std::cerr << "\n";
57 if (node->child_lookup_ >= 0) {
58 auto child_indent = indent + " ";
59 std::cerr << child_indent << "|\n";
60 for (fast_index_type i = 0; i < 256; ++i) {
61 auto child_index = lookup_table_[node->child_lookup_ * 256 + i];
62 if (child_index >= 0) {
63 const Node* child = &nodes_[child_index];
64 std::cerr << child_indent << "|-> '" << static_cast<char>(i) << "' (" << i
65 << ") -> ";
66 Dump(child, child_indent);
67 }
68 }
69 }
70}
71
72void Trie::Dump() const { Dump(&nodes_[0], ""); }
73

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected