DDD  1.9.0.20240425101308
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Statistic Class Reference

#include <statistic.hpp>

Collaboration diagram for Statistic:
Collaboration graph

Public Member Functions

 Statistic (const SDD &s, const std::string &name, OutputType style=LATEX, bool show_peak=true)
 Create a statistic for the current SDD s, style LATEX by default. More...
 
 Statistic (const DDD &s, const std::string &name, OutputType style=LATEX, bool show_peak=true)
 Create a statistic for the current DDD s, style LATEX by default. More...
 
void print_header (std::ostream &os)
 Print column headers, using current style. More...
 
void print_trailer (std::ostream &os, bool withLegend=true)
 Print trailer. More...
 
void print_line (std::ostream &os)
 Print a line for current statistic. More...
 
void print_table (std::ostream &os)
 Convenience print a table. More...
 
void print_legend (std::ostream &os)
 Print a legend to the table. More...
 
void setStyle (OutputType style)
 Setter for style. More...
 
double getTime () const
 Accessors. More...
 
long double getNbStates () const
 

Private Member Functions

void load (const SDD &s)
 load from a SDD More...
 
void load (const DDD &s)
 load from a DDD More...
 

Private Attributes

long double nb_Stat
 number of final states More...
 
long double DDD_size
 number of final DDD nodes More...
 
long double SDD_size
 number of final SDD nodes More...
 
long double DDD_peak_size
 peak DDD unicity table size More...
 
long double SDD_peak_size
 peak DDD unicity table size More...
 
double total_time
 total time More...
 
size_t memory
 resident mem (kb) More...
 
double nbHom
 Hom final. More...
 
double nbShom
 SHom final. More...
 
double ddd_cache
 DDD cache. More...
 
double sdd_cache
 SDD cache peak. More...
 
bool isPureDDD
 Mode : include SDD or not. More...
 
OutputType style
 Mode : outputType. More...
 
std::string stat_name
 Name of this statistic. More...
 
size_t shom_cache
 Size of SHom cache. More...
 
bool show_peak
 show peak More...
 

Constructor & Destructor Documentation

◆ Statistic() [1/2]

Statistic::Statistic ( const SDD s,
const std::string &  name,
OutputType  style = LATEX,
bool  show_peak = true 
)

Create a statistic for the current SDD s, style LATEX by default.

The statistic is sampled and stored, this call triggers SDD mode (more columns).

Parameters
sthe SDD used for final node and state count.
namethe row name (first column)
styleuse LATEX for formatted latex table or CSV to import in excel or gnumeric.
show_peakif you want to show peak size instead of current size for caches

References load().

◆ Statistic() [2/2]

Statistic::Statistic ( const DDD s,
const std::string &  name,
OutputType  style = LATEX,
bool  show_peak = true 
)

Create a statistic for the current DDD s, style LATEX by default.

The statistic is sampled and stored, this call triggers DDD mode (less columns).

Parameters
sthe DDD used for final node and state count.
namethe row name (first column)
styleuse LATEX for formatted latex table or CSV to import in excel or gnumeric.
show_peakif you want to show peak size instead of current size for caches

References load().

Member Function Documentation

◆ getNbStates()

long double Statistic::getNbStates ( ) const
inline

References nb_Stat.

◆ getTime()

double Statistic::getTime ( ) const
inline

Accessors.

References total_time.

◆ load() [1/2]

void Statistic::load ( const DDD s)
private

◆ load() [2/2]

void Statistic::load ( const SDD s)
private

◆ print_header()

void Statistic::print_header ( std::ostream &  os)

Print column headers, using current style.

For latex this also outputs a header (\begin document etc...).

References isPureDDD, LATEX, line_sep, show_peak, style, and value_sep.

Referenced by print_table().

◆ print_legend()

void Statistic::print_legend ( std::ostream &  os)

Print a legend to the table.

give interpretation for row headers

References isPureDDD, line_sep, show_peak, and style.

◆ print_line()

void Statistic::print_line ( std::ostream &  os)

Print a line for current statistic.

To produce tables call print_header once then print_line for all your statistics.

References ddd_cache, DDD_peak_size, DDD_size, isPureDDD, line_sep, memory, nb_Stat, nbHom, nbShom, sdd_cache, SDD_peak_size, SDD_size, shom_cache, stat_name, style, total_time, and value_sep.

Referenced by print_table().

◆ print_table()

void Statistic::print_table ( std::ostream &  os)

Convenience print a table.

Useful if you have a single stat to show. Calls print_header,print_line,print_trailer in this order.

References print_header(), print_line(), and print_trailer().

◆ print_trailer()

void Statistic::print_trailer ( std::ostream &  os,
bool  withLegend = true 
)

Print trailer.

The trailer includes a key to reading the columns. In latex mode it also closes the document.

References LATEX, and style.

Referenced by print_table().

◆ setStyle()

void Statistic::setStyle ( OutputType  style)

Setter for style.

Member Data Documentation

◆ ddd_cache

double Statistic::ddd_cache
private

DDD cache.

Referenced by load(), and print_line().

◆ DDD_peak_size

long double Statistic::DDD_peak_size
private

peak DDD unicity table size

Referenced by load(), and print_line().

◆ DDD_size

long double Statistic::DDD_size
private

number of final DDD nodes

Referenced by load(), and print_line().

◆ isPureDDD

bool Statistic::isPureDDD
private

Mode : include SDD or not.

Referenced by print_header(), print_legend(), and print_line().

◆ memory

size_t Statistic::memory
private

resident mem (kb)

Referenced by load(), and print_line().

◆ nb_Stat

long double Statistic::nb_Stat
private

number of final states

Referenced by getNbStates(), load(), and print_line().

◆ nbHom

double Statistic::nbHom
private

Hom final.

Referenced by load(), and print_line().

◆ nbShom

double Statistic::nbShom
private

SHom final.

Referenced by load(), and print_line().

◆ sdd_cache

double Statistic::sdd_cache
private

SDD cache peak.

Referenced by load(), and print_line().

◆ SDD_peak_size

long double Statistic::SDD_peak_size
private

peak DDD unicity table size

Referenced by load(), and print_line().

◆ SDD_size

long double Statistic::SDD_size
private

number of final SDD nodes

Referenced by load(), and print_line().

◆ shom_cache

size_t Statistic::shom_cache
private

Size of SHom cache.

Referenced by load(), and print_line().

◆ show_peak

bool Statistic::show_peak
private

show peak

Referenced by load(), print_header(), and print_legend().

◆ stat_name

std::string Statistic::stat_name
private

Name of this statistic.

Referenced by print_line().

◆ style

OutputType Statistic::style
private

Mode : outputType.

Referenced by print_header(), print_legend(), print_line(), and print_trailer().

◆ total_time

double Statistic::total_time
private

total time

Referenced by getTime(), load(), and print_line().


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

Please comment this page and report errors about it on the RefDocComments page.
Generated on Thu Apr 25 2024 10:15:16 for DDD by doxygen 1.9.1