Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
CompressedBitParallelTreeIndex.h
Go to the documentation of this file.
1
6/*
7 * This file is part of Algorithms library toolkit.
8 * Copyright (C) 2017 Jan Travnicek (jan.travnicek@fit.cvut.cz)
9
10 * Algorithms library toolkit is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14
15 * Algorithms library toolkit is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19
20 * You should have received a copy of the GNU General Public License
21 * along with Algorithms library toolkit. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#pragma once
25
27
29#include <core/xmlApi.hpp>
30
31#include <primitive/xml/Bool.h>
36
39
40namespace core {
41
42template < class SymbolType >
43struct xmlApi < indexes::arbology::CompressedBitParallelTreeIndex < SymbolType > > {
45 static bool first ( const ext::deque < sax::Token >::const_iterator & input );
46 static std::string xmlTagName ( );
48};
49
50template < class SymbolType >
56
57 indexes::arbology::CompressedBitParallelTreeIndex < SymbolType > res ( std::move ( alphabet ), std::move ( data ), std::move ( jumps ) );
58
60 return res;
61}
62
63template < class SymbolType >
66}
67
68template < class SymbolType >
70 return "CompressedBitParallelTreeIndex";
71}
72
73template < class SymbolType >
75 output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT );
78 core::xmlApi < ext::vector < int > >::compose ( output, index.getJumps ( ) );
79 output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT );
80}
81
82} /* namespace core */
83
Definition: SparseBoolVector.hpp:27
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
Definition: set.hpp:44
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Compressed bit parallel tree index. Stores a bit vector for each symbol of the alphabet....
Definition: CompressedBitParallelTreeIndex.h:55
const ext::map< common::ranked_symbol< SymbolType >, common::SparseBoolVector > & getData() const &
Definition: CompressedBitParallelTreeIndex.h:194
const ext::set< common::ranked_symbol< SymbolType > > & getAlphabet() const &
Definition: CompressedBitParallelTreeIndex.h:116
const ext::vector< int > & getJumps() const &
Definition: CompressedBitParallelTreeIndex.h:204
static void popToken(ext::deque< Token >::iterator &input, Token::TokenType type, const std::string &data)
Definition: FromXMLParserHelper.cpp:39
static bool isToken(ext::deque< Token >::const_iterator input, Token::TokenType type, const std::string &data)
Definition: FromXMLParserHelper.cpp:29
Definition: BarSymbol.cpp:12
return res
Definition: MinimizeByPartitioning.h:145
Definition: normalize.hpp:10
Definition: CompressedBitParallelTreeIndex.h:40
Definition: xmlApi.hpp:27