~tapaal-ltl/verifypn/fireable-empty-preset-fix

« back to all changes in this revision

Viewing changes to include/PetriEngine/TAR/range.h

  • Committer: srba.jiri at gmail
  • Date: 2021-07-07 12:02:50 UTC
  • mfrom: (233.1.63 update-parser)
  • Revision ID: srba.jiri@gmail.com-20210707120250-f86fv0m9ycbge3qs
merged in lp:~tapaal-contributor/verifypn/update-parser improving CPN unfodling and refactoring the code, fixing parser

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
                return no_lower() && no_upper();
57
57
            }
58
58
 
59
 
            bool isSound() {
 
59
            bool isSound() const {
60
60
                return _lower <= _upper;
61
61
            }
62
62
 
63
 
            bool contains(uint32_t id){
 
63
            bool contains(uint32_t id) const {
64
64
                return _lower <= id && id <= _upper;
65
65
            }
66
66
 
69
69
                _lower = min();
70
70
            }
71
71
 
72
 
            uint32_t size(){
 
72
            uint32_t size() const {
73
73
                return 1 + _upper - _lower;
74
74
            }
75
75
 
99
99
                        );
100
100
            }
101
101
 
 
102
            bool intersects(const range_t& other) const {
 
103
                return _lower <= other._upper  && other._lower <= _upper;
 
104
            }
 
105
            
102
106
            range_t& operator&=(const range_t& other) {
103
107
                _lower = std::max(_lower, other._lower);
104
108
                _upper = std::min(_upper, other._upper);