27 #ifndef CDPL_MATH_RANGE_HPP
28 #define CDPL_MATH_RANGE_HPP
56 start(start), stop(stop)
79 return (stop - start);
84 return (stop == start);
89 return (start ==
r.start && stop ==
r.stop);
102 std::swap(start,
r.start);
103 std::swap(stop,
r.stop);
116 inline Range<std::size_t>
117 range(std::size_t start, std::size_t stop)
Definition of exception classes.
Definition of various preprocessor macros for error checking.
#define CDPL_MATH_CHECK(expr, msg, e)
Definition: Check.hpp:36
Thrown to indicate that an index is out of range.
Definition: Base/Exceptions.hpp:152
Thrown to indicate that a value is out of range.
Definition: Base/Exceptions.hpp:114
friend void swap(Range &r1, Range &r2)
Definition: Range.hpp:106
bool operator!=(const Range &r) const
Definition: Range.hpp:92
Range(SizeType start, SizeType stop)
Definition: Range.hpp:55
Range()
Definition: Range.hpp:52
SizeType operator()(SizeType i) const
Definition: Range.hpp:61
SizeType getStop() const
Definition: Range.hpp:72
SizeType getStart() const
Definition: Range.hpp:67
bool isEmpty() const
Definition: Range.hpp:82
void swap(Range &r)
Definition: Range.hpp:97
SizeType getSize() const
Definition: Range.hpp:77
S SizeType
Definition: Range.hpp:50
bool operator==(const Range &r) const
Definition: Range.hpp:87
constexpr unsigned int S
Specifies that the atom has S configuration.
Definition: AtomConfiguration.hpp:63
constexpr unsigned int r
Specifies that the stereocenter has r configuration.
Definition: CIPDescriptor.hpp:76
MatrixRange< E > range(MatrixExpression< E > &e, const typename MatrixRange< E >::RangeType &r1, const typename MatrixRange< E >::RangeType &r2)
Definition: MatrixProxy.hpp:744
The namespace of the Chemical Data Processing Library.