Project
Loading...
Searching...
No Matches
test_ransMetrics.cxx File Reference

test the calculation of metrics required for renorming and encode/ packing decisions More...

#include <cassert>
#include <boost/test/unit_test.hpp>
#include <boost/mp11.hpp>
#include <gsl/span>
#include "rANS/histogram.h"
#include "rANS/metrics.h"

Go to the source code of this file.

Classes

class  MetricsTester
 

Macros

#define BOOST_TEST_MODULE   Utility test
 
#define BOOST_TEST_MAIN
 
#define BOOST_TEST_DYN_LINK
 

Typedefs

using source_type = uint32_t
 
using histogram_types = boost::mp11::mp_list< DenseHistogram< source_type >, AdaptiveHistogram< source_type >, SparseHistogram< source_type > >
 

Functions

 BOOST_AUTO_TEST_CASE (test_initDictSizeEstimate)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_emptyDictSizeEstimate, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_defaultDictSizeEstimate, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_EmptyRenormingPrecision, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_cutoffRenormingPrecision, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_noCutoffRenormingPrecision, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_emptyMetrics, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_singleElementMetrics, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_computeMetrics, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_emptySizeEstimate, histogram_T, histogram_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (test_normalSizeEstimate, histogram_T, histogram_types)
 

Detailed Description

test the calculation of metrics required for renorming and encode/ packing decisions

Author
Michael Lettrich

Definition in file test_ransMetrics.cxx.

Macro Definition Documentation

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK

Definition at line 18 of file test_ransMetrics.cxx.

◆ BOOST_TEST_MAIN

#define BOOST_TEST_MAIN

Definition at line 17 of file test_ransMetrics.cxx.

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Utility test

Definition at line 16 of file test_ransMetrics.cxx.

Typedef Documentation

◆ histogram_types

◆ source_type

using source_type = uint32_t

Definition at line 32 of file test_ransMetrics.cxx.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( test_initDictSizeEstimate  )

Definition at line 36 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [1/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_computeMetrics  ,
histogram_T  ,
histogram_types   
)

Definition at line 277 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [2/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_cutoffRenormingPrecision  ,
histogram_T  ,
histogram_types   
)

Definition at line 140 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [3/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_defaultDictSizeEstimate  ,
histogram_T  ,
histogram_types   
)

Definition at line 79 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [4/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_emptyDictSizeEstimate  ,
histogram_T  ,
histogram_types   
)

Definition at line 49 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [5/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_emptyMetrics  ,
histogram_T  ,
histogram_types   
)

Definition at line 190 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [6/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_EmptyRenormingPrecision  ,
histogram_T  ,
histogram_types   
)

Definition at line 123 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [7/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_emptySizeEstimate  ,
histogram_T  ,
histogram_types   
)

Definition at line 335 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [8/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_noCutoffRenormingPrecision  ,
histogram_T  ,
histogram_types   
)

Definition at line 159 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [9/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_normalSizeEstimate  ,
histogram_T  ,
histogram_types   
)

Definition at line 348 of file test_ransMetrics.cxx.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [10/10]

BOOST_AUTO_TEST_CASE_TEMPLATE ( test_singleElementMetrics  ,
histogram_T  ,
histogram_types   
)

Definition at line 236 of file test_ransMetrics.cxx.