23#ifndef SQL_JOIN_OPTIMIZER_ONLINE_CYCLE_FINDER_H_
24#define SQL_JOIN_OPTIMIZER_ONLINE_CYCLE_FINDER_H_
62 bool AddEdge(
int a_idx,
int b_idx);
76 void Allocate(
int node_idx,
int index_in_order) {
77 m_order[index_in_order] = node_idx;
A wrapper class which provides array bounds checking.
Definition: sql_array.h:46
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:425
A fast online cycle finder, based on [Pea03].
Definition: online_cycle_finder.h:53
void DeleteEdge(int a_idx, int b_idx)
Definition: online_cycle_finder.cc:150
Bounds_checked_array< int > m_position_of_node
Definition: online_cycle_finder.h:86
OnlineCycleFinder(MEM_ROOT *mem_root, int num_vertices)
Definition: online_cycle_finder.cc:37
Mem_root_array< int > m_to_shift
Definition: online_cycle_finder.h:92
void MoveAllMarked(int start_pos, int new_pos)
Definition: online_cycle_finder.cc:131
bool AddEdge(int a_idx, int b_idx)
Definition: online_cycle_finder.cc:87
mem_root_unordered_multimap< int, int > m_edges
Definition: online_cycle_finder.h:95
Bounds_checked_array< int > m_order
Definition: online_cycle_finder.h:82
Bounds_checked_array< bool > m_visited
Definition: online_cycle_finder.h:89
bool EdgeWouldCreateCycle(int a_idx, int b_idx)
Definition: online_cycle_finder.cc:49
void Allocate(int node_idx, int index_in_order)
Definition: online_cycle_finder.h:76
bool DepthFirstSearch(int node_idx, int upper_bound, int node_idx_to_avoid)
Definition: online_cycle_finder.cc:95
Bounds_checked_array< int > order() const
Definition: online_cycle_finder.h:71
std::unordered_multimap, but allocated on a MEM_ROOT.
Definition: map_helpers.h:298
static MEM_ROOT mem_root
Definition: client_plugin.cc:109
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82