Project
Loading...
Searching...
No Matches
tpccluster_parameter_model.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14#include <bitset>
15#include <boost/mpl/vector.hpp>
16#include <boost/mpl/string.hpp>
17
23 boost::mpl::vector<BitRangeContiguousAlphabet<uint16_t, 6, boost::mpl::string<'p', 'a', 'd', 'r', 'o', 'w'>>,
24 BitRangeContiguousAlphabet<uint16_t, 14, boost::mpl::string<'p', 'a', 'd'>>,
25 BitRangeContiguousAlphabet<uint16_t, 15, boost::mpl::string<'t', 'i', 'm', 'e'>>,
26 BitRangeContiguousAlphabet<uint16_t, 8, boost::mpl::string<'s', 'i', 'g', 'm', 'a', 'Y', '2'>>,
27 BitRangeContiguousAlphabet<uint16_t, 8, boost::mpl::string<'s', 'i', 'g', 'm', 'a', 'Z', '2'>>,
28 BitRangeContiguousAlphabet<uint16_t, 16, boost::mpl::string<'c', 'h', 'a', 'r', 'g', 'e'>>,
29 BitRangeContiguousAlphabet<uint16_t, 10, boost::mpl::string<'q', 'm', 'a', 'x'>>>;
36template <typename RepT, int Length, typename Description>
37using Model = o2::HuffmanModel<ProbabilityModel<BitRangeContiguousAlphabet<RepT, Length, Description>>,
38 o2::HuffmanNode<std::bitset<64>>, true>;
39
41 boost::mpl::vector<Model<uint16_t, /* */ 6, boost::mpl::string<'p', 'a', 'd', 'r', 'o', 'w'>>,
42 Model<uint16_t, 14, boost::mpl::string<'p', 'a', 'd'>>,
43 Model<uint16_t, 15, boost::mpl::string<'t', 'i', 'm', 'e'>>,
44 Model<uint16_t, /* */ 8, boost::mpl::string<'s', 'i', 'g', 'm', 'a', 'Y', '2'>>,
45 Model<uint16_t, /* */ 8, boost::mpl::string<'s', 'i', 'g', 'm', 'a', 'Z', '2'>>,
46 Model<uint16_t, 16, boost::mpl::string<'c', 'h', 'a', 'r', 'g', 'e'>>,
47 Model<uint16_t, 10, boost::mpl::string<'q', 'm', 'a', 'x'>>>;
48
69//using namespace boost::mpl::placeholders;
70//
71//typedef boost::mpl::fold<
72// tpccluster_parameter,
73// boost::mpl::vector<>,
74// boost::mpl::push_back<
75// _1
76// , AliceO2::HuffmanModel< ProbabilityModel< _2 >, AliceO2::HuffmanNode<std::bitset<64>>, true>
77// >
78// >::type models_t;
79
81//typedef boost::mpl::string<'T','e','s','t'>::type TestAlphabetName;
82//typedef ContiguousAlphabet<int16_t, -1, 10, TestAlphabetName> TestAlphabet;
83//
84//typedef typename boost::mpl::lambda< ProbabilityModel< _1 > > apply_alphabet;
85//typedef boost::mpl::apply1<apply_alphabet, TestAlphabet>::type TestAlphabetModel;
86//typedef typename boost::mpl::lambda< AliceO2::HuffmanModel< _1, AliceO2::HuffmanNode<std::bitset<64>>, true> > apply_probabilitymodel;
87//typedef typename boost::mpl::apply1<boost::mpl::protect<apply_probabilitymodel>::type, TestAlphabetModel>::type TestHuffmanModel;
88//
89//TestAlphabetModel object;
90//typedef TestAlphabetModel::value_type vtype;
91//
92//std::cout << object.getName() << std::endl;
93
94//typedef boost::mpl::fold<
95// tpccluster_parameter,
96// boost::mpl::vector<>,
97// boost::mpl::push_back<
98// _1
99// , boost::mpl::apply1< boost::mpl::protect<apply_huffmanmodel>::type, _2 >
100// >
101// >::type models_t;
Implementation of a Huffman codec.
Primitives for data compression.
boost::mpl::vector< Model< uint16_t, 6, boost::mpl::string< 'p', 'a', 'd', 'r', 'o', 'w'> >, Model< uint16_t, 14, boost::mpl::string< 'p', 'a', 'd'> >, Model< uint16_t, 15, boost::mpl::string< 't', 'i', 'm', 'e'> >, Model< uint16_t, 8, boost::mpl::string< 's', 'i', 'g', 'm', 'a', 'Y', '2'> >, Model< uint16_t, 8, boost::mpl::string< 's', 'i', 'g', 'm', 'a', 'Z', '2'> >, Model< uint16_t, 16, boost::mpl::string< 'c', 'h', 'a', 'r', 'g', 'e'> >, Model< uint16_t, 10, boost::mpl::string< 'q', 'm', 'a', 'x'> > > tpccluster_parameter_models
boost::mpl::vector< BitRangeContiguousAlphabet< uint16_t, 6, boost::mpl::string< 'p', 'a', 'd', 'r', 'o', 'w'> >, BitRangeContiguousAlphabet< uint16_t, 14, boost::mpl::string< 'p', 'a', 'd'> >, BitRangeContiguousAlphabet< uint16_t, 15, boost::mpl::string< 't', 'i', 'm', 'e'> >, BitRangeContiguousAlphabet< uint16_t, 8, boost::mpl::string< 's', 'i', 'g', 'm', 'a', 'Y', '2'> >, BitRangeContiguousAlphabet< uint16_t, 8, boost::mpl::string< 's', 'i', 'g', 'm', 'a', 'Z', '2'> >, BitRangeContiguousAlphabet< uint16_t, 16, boost::mpl::string< 'c', 'h', 'a', 'r', 'g', 'e'> >, BitRangeContiguousAlphabet< uint16_t, 10, boost::mpl::string< 'q', 'm', 'a', 'x'> > > tpccluster_parameter