PointArithmetic Module¶
Module Contents¶
-
template<class PointT>
PointT tracktable::arithmetic::add(PointT const &left, PointT const &right)¶ Add two points.
- Parameters:
left – [in] Point to add
right – [in] Point to add
- Returns:
Sum of points
-
template<class PointT>
PointT tracktable::arithmetic::add_in_place(PointT &left, PointT const &right)¶ Add two points in place.
- Parameters:
left – [in] Point to add
right – [in] Point to add
- Returns:
Sum of points
-
template<class PointT>
PointT tracktable::arithmetic::subtract(PointT const &left, PointT const &right)¶ Subtract two points.
- Parameters:
left – [in] Point to subtract
right – [in] Point to subtract
- Returns:
Difference of points
-
template<class PointT>
PointT tracktable::arithmetic::subtract_in_place(PointT &left, PointT const &right)¶ Subtract two points in place.
- Parameters:
left – [in] Point to subtract
right – [in] Point to subtract
- Returns:
Difference of points
-
template<class PointT>
PointT tracktable::arithmetic::multiply(PointT const &left, PointT const &right)¶ Multiply two points.
- Parameters:
left – [in] Point to multiply
right – [in] Point to multiply
- Returns:
Product of points
-
template<class PointT>
PointT tracktable::arithmetic::multiply_in_place(PointT &left, PointT const &right)¶ Multiply two points in place.
- Parameters:
left – [in] Point to multiply
right – [in] Point to multiply
- Returns:
Product of points
-
template<class PointT, typename ScalarT>
PointT tracktable::arithmetic::multiply_scalar(PointT const &left, ScalarT const &value)¶ Multiply a point by a scalar.
- Parameters:
left – [in] Point to multiply
value – [in] Scalar to multiply point by
- Returns:
Scaled point product
-
template<class PointT, typename ScalarT>
PointT tracktable::arithmetic::multiply_scalar_in_place(PointT &left, ScalarT const &value)¶ Multiply a point by a scalar in place.
- Parameters:
left – [in] Point to multiply
value – [in] Scalar to multiply point by
- Returns:
Scaled point product
-
template<class PointT>
PointT tracktable::arithmetic::divide(PointT const &left, PointT const &right)¶ Divide two points.
- Parameters:
left – [in] Point to divide
right – [in] Point to divide
- Returns:
Quotient of point
-
template<class PointT>
PointT tracktable::arithmetic::divide_in_place(PointT &left, PointT const &right)¶ Divide two points in place.
- Parameters:
left – [in] Point to divide
right – [in] Point to divide
- Returns:
Quotient of point
-
template<class PointT, typename ScalarT>
PointT tracktable::arithmetic::divide_scalar(PointT const &left, ScalarT const &value)¶ Divide a point by a scalar.
- Parameters:
left – [in] Point to divide
value – [in] Scalar to divide point by
- Returns:
Scaled point quotient
-
template<class PointT, typename ScalarT>
PointT tracktable::arithmetic::divide_scalar_in_place(PointT &left, ScalarT const &value)¶ Divide a point by a scalar in place.
- Parameters:
left – [in] Point to divide
value – [in] Scalar to divide point by
- Returns:
Scaled point quotient
-
template<class PointT>
double tracktable::arithmetic::dot(PointT const &left, PointT const &right)¶ Compute dot product of two points.
- Parameters:
left – [in] Point to use during computation
right – [in] Point to use during computation
- Returns:
Sum of point products
-
template<class PointT>
double tracktable::arithmetic::norm_squared(PointT const &left)¶ Square the given point.
- Parameters:
left – [in] Point to square
- Returns:
Squared value of point