MySQL 8.0.39
Source Code Documentation
AdjacencyList Class Reference

Simplified adjacency list: a window can maximum reference (depends on) one other window due to syntax restrictions. More...

Public Member Functions

 AdjacencyList (uint elements)
 
 ~AdjacencyList ()
 
void add (uint wno, uint depends_on)
 Add a dependency. More...
 
uint out_degree (uint wno)
 If the window depends on another window, return 1, else 0. More...
 
uint in_degree (uint wno)
 Return the number of windows that depend on this one. More...
 
bool check_circularity ()
 Return true of there is a circularity in the graph. More...
 

Public Attributes

uint *const m_list
 
const uint m_size
 

Static Public Attributes

static constexpr uint UNUSED = std::numeric_limits<uint>::max()
 

Detailed Description

Simplified adjacency list: a window can maximum reference (depends on) one other window due to syntax restrictions.

If there is no dependency, m_list[wno] == UNUSED. If w1 depends on w2, m_list[w1] == w2.

Constructor & Destructor Documentation

◆ AdjacencyList()

AdjacencyList::AdjacencyList ( uint  elements)
inline

◆ ~AdjacencyList()

AdjacencyList::~AdjacencyList ( )
inline

Member Function Documentation

◆ add()

void AdjacencyList::add ( uint  wno,
uint  depends_on 
)
inline

Add a dependency.

Parameters
wnothe window that references another in its definition
depends_onthe window referenced

◆ check_circularity()

bool AdjacencyList::check_circularity ( )
inline

Return true of there is a circularity in the graph.

◆ in_degree()

uint AdjacencyList::in_degree ( uint  wno)
inline

Return the number of windows that depend on this one.

Parameters
wnothe window
Returns
the in degree

◆ out_degree()

uint AdjacencyList::out_degree ( uint  wno)
inline

If the window depends on another window, return 1, else 0.

Parameters
wnothe window
Returns
the out degree

Member Data Documentation

◆ m_list

uint* const AdjacencyList::m_list

◆ m_size

const uint AdjacencyList::m_size

◆ UNUSED

constexpr uint AdjacencyList::UNUSED = std::numeric_limits<uint>::max()
staticconstexpr

The documentation for this class was generated from the following file: