2
* To change this license header, choose License Headers in Project Properties.
3
* To change this template file, choose Tools | Templates
4
* and open the template in the editor.
11
* Created on February 20, 2018, 10:37 AM
23
namespace PetriEngine {
33
Iterator(Multiset* ms, size_t index)
34
: ms(ms), index(index) {}
36
bool operator==(Iterator& other);
37
bool operator!=(Iterator& other);
38
Iterator& operator++();
39
std::pair<const Color*,uint32_t&> operator++(int);
40
std::pair<const Color*,uint32_t&> operator*();
43
typedef std::vector<std::pair<uint32_t,uint32_t>> Internal;
47
Multiset(const Multiset& orig);
48
Multiset(std::pair<const Color*,uint32_t> color);
49
Multiset(std::vector<std::pair<const Color*,uint32_t>>& colors);
52
Multiset operator+ (const Multiset& other) const;
53
Multiset operator- (const Multiset& other) const;
54
Multiset operator* (uint32_t scalar) const;
55
void operator+= (const Multiset& other);
56
void operator-= (const Multiset& other);
57
void operator*= (uint32_t scalar);
58
uint32_t operator[] (const Color* color) const;
59
uint32_t& operator[] (const Color* color);
64
size_t distinctSize() const {
73
std::string toString() const;
82
#endif /* MULTISET_H */