23#ifndef SQL_JOIN_OPTIMIZER_HYPERGRAPH_H_
24#define SQL_JOIN_OPTIMIZER_HYPERGRAPH_H_ 1
73 static constexpr int Size =
74 sizeof(std::vector<unsigned>) * 2 +
sizeof(
NodeMap);
77static_assert(
sizeof(
Node) >= 64);
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:425
static MEM_ROOT mem_root
Definition: client_plugin.cc:109
Definition: hypergraph.cc:29
uint64_t NodeMap
Since our graphs can never have more than 61 tables, node sets and edge lists are implemented using 6...
Definition: node_map.h:39
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
Definition: hypergraph.h:79
NodeMap left
Definition: hypergraph.h:84
NodeMap right
Definition: hypergraph.h:85
Definition: hypergraph.h:88
Mem_root_array< Node > nodes
Definition: hypergraph.h:91
void AddNode()
Definition: hypergraph.cc:31
Hypergraph(MEM_ROOT *mem_root)
Definition: hypergraph.h:90
void AddEdge(NodeMap left, NodeMap right)
Definition: hypergraph.cc:33
void AttachEdgeToNodes(size_t left_first_idx, size_t right_first_idx, NodeMap left, NodeMap right)
Definition: hypergraph.cc:117
Mem_root_array< Hyperedge > edges
Definition: hypergraph.h:92
void ModifyEdge(unsigned edge_idx, NodeMap new_left, NodeMap new_right)
Definition: hypergraph.cc:57
Definition: hypergraph.h:50
char padding[std::max< int >(1, 64 - Size)]
Definition: hypergraph.h:75
std::vector< unsigned > complex_edges
Definition: hypergraph.h:64
static constexpr int Size
Definition: hypergraph.h:73
NodeMap simple_neighborhood
Definition: hypergraph.h:67
std::vector< unsigned > simple_edges
Definition: hypergraph.h:64