source: icGREP/icgrep-devel/icgrep/cc/multiplex_CCs.h @ 5801

Last change on this file since 5801 was 5801, checked in by cameron, 16 months ago

Additional Alphabet analysis and transformation

File size: 1.1 KB
RevLine 
[5369]1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef MULTIPLEX_CCS_H
6#define MULTIPLEX_CCS_H
7
8#include <vector>
[5795]9#include <cc/alphabet.h>
[5369]10
[5748]11namespace re { class CC; }
[5369]12
[5795]13namespace cc {
[5748]14
[5795]15class MultiplexedAlphabet : public Alphabet {
16public:
17    MultiplexedAlphabet(std::string alphabetName, const std::vector<const re::CC *> CCs);
[5800]18    static inline bool classof(const Alphabet * a) {
19        return a->getClassTypeId() == ClassTypeId::MultiplexedAlphabet;
20    }
21    static inline bool classof(const void *) {return false;}
22
23    const Alphabet * getSourceAlphabet() const;
[5795]24   
25    std::vector<std::vector<unsigned>> getExclusiveSetIDs();
26   
27    std::vector<re::CC *> getMultiplexedCCs();
[5799]28   
[5801]29    re::CC * transformCC(const re::CC * sourceCC) const;
30   
31    re::CC * invertCC(const re::CC * transformedCC) const;
[5795]32private:
[5799]33    const Alphabet * mSourceAlphabet;
34    const std::vector<const re::CC *> mUnicodeSets;
[5795]35    std::vector<std::vector<unsigned>> mExclusiveSetIDs;
36    std::vector<re::CC *> mMultiplexedCCs;
37};
38}
[5369]39
[5795]40
[5369]41#endif
Note: See TracBrowser for help on using the repository browser.