MySQL 8.1.0
Source Code Documentation
TrivialReceiver Class Reference

A very simple receiver to be used with DPhyp; all it does is to keep track of which subgraphs it has seen (which is required for the algorithm to test connectedness), count them, and stop if we reach a given limit. More...

#include <trivial_receiver.h>

Public Member Functions

 TrivialReceiver (const JoinHypergraph &graph, MEM_ROOT *mem_root, int subgraph_pair_limit)
 
bool HasSeen (hypergraph::NodeMap subgraph) const
 
bool FoundSingleNode (int node_idx)
 
bool FoundSubgraphPair (hypergraph::NodeMap left, hypergraph::NodeMap right, int edge_idx)
 

Public Attributes

int seen_nodes = 0
 
int seen_subgraph_pairs = 0
 

Private Attributes

mem_root_unordered_set< hypergraph::NodeMapm_seen_subgraphs
 
const JoinHypergraphm_graph
 
const int m_subgraph_pair_limit
 

Detailed Description

A very simple receiver to be used with DPhyp; all it does is to keep track of which subgraphs it has seen (which is required for the algorithm to test connectedness), count them, and stop if we reach a given limit.

This is usable both from unit tests (although we don't actually currently use it for such) and for making a cheap test of whether the number of subgraph pairs is below a given limit; see GraphSimplifier for the latter. (The graph simplification paper, [Neu09], mentions running a special mode where we don't check for subgraph complements at all, only connected subgraphs, but we haven't investigated to what degree this would be possible for our implementation, or whether it would be advantageous at all.)

Constructor & Destructor Documentation

◆ TrivialReceiver()

TrivialReceiver::TrivialReceiver ( const JoinHypergraph graph,
MEM_ROOT mem_root,
int  subgraph_pair_limit 
)
inline

Member Function Documentation

◆ FoundSingleNode()

bool TrivialReceiver::FoundSingleNode ( int  node_idx)
inline

◆ FoundSubgraphPair()

bool TrivialReceiver::FoundSubgraphPair ( hypergraph::NodeMap  left,
hypergraph::NodeMap  right,
int  edge_idx 
)
inline

◆ HasSeen()

bool TrivialReceiver::HasSeen ( hypergraph::NodeMap  subgraph) const
inline

Member Data Documentation

◆ m_graph

const JoinHypergraph* TrivialReceiver::m_graph
private

◆ m_seen_subgraphs

mem_root_unordered_set<hypergraph::NodeMap> TrivialReceiver::m_seen_subgraphs
private

◆ m_subgraph_pair_limit

const int TrivialReceiver::m_subgraph_pair_limit
private

◆ seen_nodes

int TrivialReceiver::seen_nodes = 0

◆ seen_subgraph_pairs

int TrivialReceiver::seen_subgraph_pairs = 0

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