24#ifndef SQL_JOIN_OPTIMIZER_ONLINE_CYCLE_FINDER_H_
25#define SQL_JOIN_OPTIMIZER_ONLINE_CYCLE_FINDER_H_
63 bool AddEdge(
int a_idx,
int b_idx);
77 void Allocate(
int node_idx,
int index_in_order) {
78 m_order[index_in_order] = node_idx;
A wrapper class which provides array bounds checking.
Definition: sql_array.h:47
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
A fast online cycle finder, based on [Pea03].
Definition: online_cycle_finder.h:54
void DeleteEdge(int a_idx, int b_idx)
Definition: online_cycle_finder.cc:151
Bounds_checked_array< int > m_position_of_node
Definition: online_cycle_finder.h:87
OnlineCycleFinder(MEM_ROOT *mem_root, int num_vertices)
Definition: online_cycle_finder.cc:38
Mem_root_array< int > m_to_shift
Definition: online_cycle_finder.h:93
void MoveAllMarked(int start_pos, int new_pos)
Definition: online_cycle_finder.cc:132
bool AddEdge(int a_idx, int b_idx)
Definition: online_cycle_finder.cc:88
mem_root_unordered_multimap< int, int > m_edges
Definition: online_cycle_finder.h:96
Bounds_checked_array< int > m_order
Definition: online_cycle_finder.h:83
Bounds_checked_array< bool > m_visited
Definition: online_cycle_finder.h:90
bool EdgeWouldCreateCycle(int a_idx, int b_idx)
Definition: online_cycle_finder.cc:50
void Allocate(int node_idx, int index_in_order)
Definition: online_cycle_finder.h:77
bool DepthFirstSearch(int node_idx, int upper_bound, int node_idx_to_avoid)
Definition: online_cycle_finder.cc:96
Bounds_checked_array< int > order() const
Definition: online_cycle_finder.h:72
std::unordered_multimap, but allocated on a MEM_ROOT.
Definition: map_helpers.h:308
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83