mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
cardinality_gen.cpp File Reference
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <memory>
#include <mutable/IR/PlanTable.hpp>
#include <mutable/mutable.hpp>
#include <mutable/Options.hpp>
#include <mutable/util/ArgParser.hpp>
#include <mutable/util/fn.hpp>
#include <random>
#include <stdexcept>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
Include dependency graph for cardinality_gen.cpp:

Go to the source code of this file.

Data Structures

struct  skewed_distribution< RealType >
 A distribution of values in range [0; 1] that are skewed towards 0. More...
 

Macros

#define ADD(TYPE, VAR, INIT, SHORT, LONG, DESCR, CALLBACK)
 

Typedefs

using Subproblem = m::SmallBitset
 
using table_type = std::unordered_map< Subproblem, uint64_t, m::SubproblemHash >
 

Functions

template<typename Generator >
void generate_correlated_cardinalities (table_type &table, const m::QueryGraph &G, Generator &&g)
 
template<typename Generator >
void generate_uncorrelated_cardinalities (table_type &table, const m::QueryGraph &G, Generator &&g)
 
void emit_cardinalities (std::ostream &out, const m::QueryGraph &G, const table_type &table)
 
void usage (std::ostream &out, const char *name)
 
int main (int argc, const char **argv)
 

Variables

struct {
   bool   show_help
 

‍whether to show a help message

More...
 
   unsigned   seed
 

‍the seed for the PRNG

More...
 
   bool   correlated_selectivities
 

‍whether selectivities are correlated

More...
 
   std::size_t   min_cardinality
 

‍minimum cardinality of relations and intermediate results

More...
 
   std::size_t   max_cardinality
 

‍maximum cardinality of relations and intermediate results

More...
 
   double   alpha
 

‍alpha for skewed distribution

More...
 
args
 

Macro Definition Documentation

◆ ADD

#define ADD (   TYPE,
  VAR,
  INIT,
  SHORT,
  LONG,
  DESCR,
  CALLBACK 
)
Value:
VAR = INIT;\
{\
AP.add<TYPE>(SHORT, LONG, DESCR, CALLBACK);\
}
#define CALLBACK(NAME, FUNC)

Typedef Documentation

◆ Subproblem

Definition at line 24 of file cardinality_gen.cpp.

◆ table_type

using table_type = std::unordered_map<Subproblem, uint64_t, m::SubproblemHash>

Definition at line 70 of file cardinality_gen.cpp.

Function Documentation

◆ emit_cardinalities()

void emit_cardinalities ( std::ostream &  out,
const m::QueryGraph G,
const table_type table 
)

◆ generate_correlated_cardinalities()

template<typename Generator >
void generate_correlated_cardinalities ( table_type table,
const m::QueryGraph G,
Generator &&  g 
)

◆ generate_uncorrelated_cardinalities()

template<typename Generator >
void generate_uncorrelated_cardinalities ( table_type table,
const m::QueryGraph G,
Generator &&  g 
)

◆ main()

int main ( int  argc,
const char **  argv 
)

◆ usage()

void usage ( std::ostream &  out,
const char *  name 
)

Definition at line 80 of file cardinality_gen.cpp.

Referenced by main().

Variable Documentation

◆ alpha

double alpha

‍alpha for skewed distribution

Definition at line 67 of file cardinality_gen.cpp.

Referenced by main().

◆ 

struct { ... } args

◆ correlated_selectivities

bool correlated_selectivities

‍whether selectivities are correlated

Definition at line 61 of file cardinality_gen.cpp.

◆ max_cardinality

std::size_t max_cardinality

‍maximum cardinality of relations and intermediate results

Definition at line 65 of file cardinality_gen.cpp.

Referenced by m::InjectionCardinalityEstimator::estimate_join(), generate_correlated_cardinalities(), and m::InjectionCardinalityEstimator::operator()().

◆ min_cardinality

std::size_t min_cardinality

‍minimum cardinality of relations and intermediate results

Definition at line 63 of file cardinality_gen.cpp.

◆ seed

unsigned seed

‍the seed for the PRNG

Definition at line 59 of file cardinality_gen.cpp.

Referenced by generate_uncorrelated_cardinalities().

◆ show_help

bool show_help

‍whether to show a help message

Definition at line 57 of file cardinality_gen.cpp.

Referenced by main().