18 if (vector.size() != 3) {
79 return result += other;
98 return result -= other;
116 return result += other;
133 return result -= other;
150 return result *= other;
167 return result /= other;
185 return result += other;
202 return result -= other;
219 return result *= other;
236 return result /= other;
252 return Kernel::V3D(boost::rational_cast<double>(m_x), boost::rational_cast<double>(m_y),
253 boost::rational_cast<double>(m_z));
274 if (
m_x != other.m_x) {
275 return m_x < other.m_x;
278 if (
m_y != other.m_y) {
279 return m_y < other.m_y;
282 return m_z < other.m_z;
296V3R::operator std::vector<double>()
const {
297 std::vector<double> vector;
298 vector.emplace_back(boost::rational_cast<double>(m_x));
299 vector.emplace_back(boost::rational_cast<double>(m_y));
300 vector.emplace_back(boost::rational_cast<double>(m_z));
std::map< DeltaEMode::Type, std::string > index
V3R & operator*=(int other)
Performs the operation v1 *= i in place, which multiplies each component of v1 with the integer i.
V3R operator/(int other) const
Performs the operation v' = v1 / i, which divides each component of v1 by the integer i.
V3R operator*(int other) const
Performs the operation v' = v1 * i, which multiplies each component of v1 with the integer i.
V3R()
Default constructor, all elements 0.
const RationalNumber & z() const
Returns the z-component of the vector.
bool operator==(const V3R &other) const
Returns true if all components of the compared vectors are equal, false otherwise.
V3R & operator/=(int other)
Performs the operation v1 /= i in place, which divides each component of v1 by the integer i.
RationalNumber & operator[](size_t index)
Array-style non-const access to the components.
bool operator<(const V3R &other) const
Compares x of both vectors first, if those are equal the function compares y and finally z.
void setZ(const RationalNumber &newZ)
Assigns a new value to the z-component.
V3R operator-() const
Negates all components of the vector.
V3R getPositiveVector() const
Returns a V3R with absolute components.
void setX(const RationalNumber &newX)
Assigns a new value to the x-component.
V3R & operator+=(const V3R &other)
Performs the operation v1 += v2 in place, which adds the components of v2 to the components of v1.
V3R & operator-=(const V3R &other)
Performs the operation v1 -= v2 in place, which subtracts the components of v2 from the components of...
void setY(const RationalNumber &newY)
Assigns a new value to the y-component.
const RationalNumber & y() const
Returns the y-component of the vector.
const RationalNumber & x() const
Returns the x-component of the vector.
bool operator!=(const V3R &other) const
Returns true if the compared vectors are not equal.
V3R operator+(const V3R &other) const
Performs the operation v1 + v2, which sums the vectors component-wise.
Exception for index errors.
Error when two numbers should be identical (or close)
boost::rational< int > RationalNumber
V3R :