|
| template<typename T > |
| AMRange< T > | AMCore::intersect (const AMRange< T > &left, const AMRange< T > &right) |
| | intersect Intersection with right interval If ranges are in disjunction, returnned rage is empty More...
|
| |
| template<typename T > |
| AMRange< T > | AMCore::operator+ (const AMRange< T > &left, const AMRange< T > &right) |
| | plus operator Cut part of range by intersect with right operand. If right range is inside left, returned range is left range. If ranges are in disjunction (and range will splitted to two), returned range is invalid. More...
|
| |
| template<typename T > |
| AMRange< T > | AMCore::operator- (const AMRange< T > &left, const AMRange< T > &right) |
| | minus operator Cut part of range by intersect with right operand. If ranges are in disjunction, range is unchanged. If right range is inside left (and range will be splitted to two intervals), range become invalid. More...
|
| |
| template<typename T > |
| bool | AMCore::isPacked (const std::set< AMRange< T > > &s) |
| | packed test Set of ranges is packed when, ranges has not intersections. E.q. Second range starts above first range end, third range start above second range end. Packed set of ranges also when, ranges are not splitted, E.q. range right bound not equal another range left bound More...
|
| |
| template<typename T > |
| bool | AMCore::valid (const std::set< AMRange< T > > &s) |
| | valid test Set of ranges is valid when all range in are valid More...
|
| |
| template<typename T > |
| std::set< AMRange< T > > | AMCore::pack (const std::set< AMRange< T > > &s) |
| | pack a set of ranges Set of ranges is packed when, ranges has not intersections. E.q. Second range starts above first range end, third range start above second range end. Packed set of ranges also when, ranges are not splitted, E.q. range right bound not equal another range left bound More...
|
| |
| template<typename T > |
| std::set< AMRange< T > > | AMCore::operator+ (const std::set< AMRange< T > > &left, const std::set< AMRange< T > > &right) |
| | plus operator Adds two set of ranges. Sets of range must be valid. Result set of ranges is packed. More...
|
| |
| template<typename T > |
| std::set< AMRange< T > > | AMCore::operator- (const std::set< AMRange< T > > &left, const std::set< AMRange< T > > &right) |
| | minus operator Subtracts two set of ranges. Sets of ranges must be valid. Result set of ranges is packed. More...
|
| |
| template<typename T > |
| std::set< AMRange< T > > | AMCore::operator+ (const AMRange< T > &left, const std::set< AMRange< T > > &right) |
| | plus operator Adds range and set of ranges. Set of range mus be valid. Result set of ranges is packed. More...
|
| |
| template<typename T > |
| std::set< AMRange< T > > | AMCore::operator- (const AMRange< T > &left, const std::set< AMRange< T > > &right) |
| | minus operator Subtracts range and set of ranges. Set of range mus be valid. Result set of ranges is packed. More...
|
| |
| template<typename T > |
| std::set< AMRange< T > > | AMCore::operator+ (const std::set< AMRange< T > > &left, const AMRange< T > &right) |
| | plus operator Adds set of ranges and range Set of range must be valid. Result set of ranges is packed. More...
|
| |
| template<typename T > |
| std::set< AMRange< T > > | AMCore::operator- (const std::set< AMRange< T > > &left, const AMRange< T > &right) |
| | minus operator Subtracts set of ranges and range Set of range must be valid. Result set of ranges is packed. More...
|
| |
Range and set of range operations
- Author
- Zdeněk Skulínek <me@zdenekskulinek.cz>
template<typename T >
| bool AMCore::isPacked |
( |
const std::set< AMRange< T > > & |
s | ) |
|
packed test Set of ranges is packed when, ranges has not intersections. E.q. Second range starts above first range end, third range start above second range end. Packed set of ranges also when, ranges are not splitted, E.q. range right bound not equal another range left bound
- Parameters
-
- Exceptions
-
| This | function will not throw an exception. |
References AMCore::isPacked().
Referenced by AMCore::isPacked().
template<typename T >
| std::set< AMRange< T > > AMCore::pack |
( |
const std::set< AMRange< T > > & |
s | ) |
|
pack a set of ranges Set of ranges is packed when, ranges has not intersections. E.q. Second range starts above first range end, third range start above second range end. Packed set of ranges also when, ranges are not splitted, E.q. range right bound not equal another range left bound
- Parameters
-
- Exceptions
-
| This | function will not throw an exception. |
References AMCore::pack(), and AMCore::AMRange< T >::valid().
Referenced by AMCore::operator+(), AMCore::operator-(), and AMCore::pack().