PCL
Vector Operators

Functions

template<typename T >
pcl::operator* (const GenericVector< T > &A, const GenericVector< T > &B) noexcept
 
template<typename T , typename S >
GenericVector< T > pcl::operator* (const GenericVector< T > &A, const S &x)
 
template<typename T , typename S >
GenericVector< T > pcl::operator* (const S &x, const GenericVector< T > &A)
 
template<typename T , typename S >
GenericVector< T > pcl::operator* (const S &x, GenericVector< T > &&A)
 
template<typename T , typename S >
GenericVector< T > pcl::operator* (GenericVector< T > &&A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator+ (const GenericVector< T > &A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator+ (const GenericVector< T > &A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator+ (const GenericVector< T > &A, GenericVector< T > &&B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator+ (const S &x, const GenericVector< T > &A)
 
template<typename T , typename S >
GenericVector< T > pcl::operator+ (const S &x, GenericVector< T > &&A)
 
template<typename T >
GenericVector< T > pcl::operator+ (GenericVector< T > &&A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator+ (GenericVector< T > &&A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator+ (GenericVector< T > &&A, GenericVector< T > &&B)
 
template<typename T >
GenericVector< T > pcl::operator- (const GenericVector< T > &A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator- (const GenericVector< T > &A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator- (const GenericVector< T > &A, GenericVector< T > &&B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator- (const S &x, const GenericVector< T > &A)
 
template<typename T , typename S >
GenericVector< T > pcl::operator- (const S &x, GenericVector< T > &&A)
 
template<typename T >
GenericVector< T > pcl::operator- (GenericVector< T > &&A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator- (GenericVector< T > &&A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator- (GenericVector< T > &&A, GenericVector< T > &&B)
 
template<typename T >
GenericVector< T > pcl::operator/ (const GenericVector< T > &A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator/ (const GenericVector< T > &A, const S &x)
 
template<typename T , typename S >
GenericVector< T > pcl::operator/ (const S &x, const GenericVector< T > &A)
 
template<typename T , typename S >
GenericVector< T > pcl::operator/ (const S &x, GenericVector< T > &&A)
 
template<typename T >
GenericVector< T > pcl::operator/ (GenericVector< T > &&A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator/ (GenericVector< T > &&A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator^ (const GenericVector< T > &A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator^ (const GenericVector< T > &A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator^ (const GenericVector< T > &A, GenericVector< T > &&B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator^ (const S &x, const GenericVector< T > &A)
 
template<typename T , typename S >
GenericVector< T > pcl::operator^ (const S &x, GenericVector< T > &&A)
 
template<typename T >
GenericVector< T > pcl::operator^ (GenericVector< T > &&A, const GenericVector< T > &B)
 
template<typename T , typename S >
GenericVector< T > pcl::operator^ (GenericVector< T > &&A, const S &x)
 
template<typename T >
GenericVector< T > pcl::operator^ (GenericVector< T > &&A, GenericVector< T > &&B)
 

Detailed Description

This section includes scalar-to-vector and vector-to-vector arithmetic operator functions that are not members of the GenericVector template class.

Function Documentation

◆ operator*() [1/5]

template<typename T >
T pcl::operator* ( const GenericVector< T > &  A,
const GenericVector< T > &  B 
)
inlinenoexcept

Returns the dot product of two vectors A and B.

Note
For performance reasons, this function does not check whether the specified vectors have compatible lengths; in case B has less components than A, this function will invoke undefined behavior.

Definition at line 2872 of file Vector.h.

◆ operator*() [2/5]

template<typename T , typename S >
GenericVector<T> pcl::operator* ( const GenericVector< T > &  A,
const S &  x 
)
inline

Returns the product of a vector A by a scalar x.

Definition at line 2901 of file Vector.h.

◆ operator*() [3/5]

template<typename T , typename S >
GenericVector<T> pcl::operator* ( const S &  x,
const GenericVector< T > &  A 
)
inline

Returns the product of a scalar x and a vector A.

This function exists to implement the commutative property of scalar-to-vector multiplication. It is equivalent to A * x.

Definition at line 2932 of file Vector.h.

◆ operator*() [4/5]

template<typename T , typename S >
GenericVector<T> pcl::operator* ( const S &  x,
GenericVector< T > &&  A 
)
inline

Returns the product of a scalar x and a vector A (rvalue reference).

This function exists to implement the commutative property of scalar-to-vector multiplication. It is equivalent to A * x.

Definition at line 2945 of file Vector.h.

◆ operator*() [5/5]

template<typename T , typename S >
GenericVector<T> pcl::operator* ( GenericVector< T > &&  A,
const S &  x 
)
inline

Returns the product of a vector A (rvalue reference) by a scalar x.

Definition at line 2918 of file Vector.h.

◆ operator+() [1/8]

template<typename T >
GenericVector<T> pcl::operator+ ( const GenericVector< T > &  A,
const GenericVector< T > &  B 
)
inline

Returns the sum of two vectors A and B.

If the specified vectors are incompatible for vector addition (because B has less components than A), this function throws an Error exception.

Definition at line 2502 of file Vector.h.

◆ operator+() [2/8]

template<typename T , typename S >
GenericVector<T> pcl::operator+ ( const GenericVector< T > &  A,
const S &  x 
)
inline

Returns the sum of a vector A and a scalar x.

Definition at line 2575 of file Vector.h.

◆ operator+() [3/8]

template<typename T >
GenericVector<T> pcl::operator+ ( const GenericVector< T > &  A,
GenericVector< T > &&  B 
)
inline

Returns the sum of two vectors A and B (rvalue reference).

If the specified vectors are incompatible for vector addition (because B has less components than A), this function throws an Error exception.

Definition at line 2549 of file Vector.h.

◆ operator+() [4/8]

template<typename T , typename S >
GenericVector<T> pcl::operator+ ( const S &  x,
const GenericVector< T > &  A 
)
inline

Returns the sum of a scalar x and a vector A.

This function exists to implement the commutative property of scalar-to-vector addition; it is equivalent to A + x.

Definition at line 2606 of file Vector.h.

◆ operator+() [5/8]

template<typename T , typename S >
GenericVector<T> pcl::operator+ ( const S &  x,
GenericVector< T > &&  A 
)
inline

Returns the sum of a scalar x and a vector A (rvalue reference).

This function exists to implement the commutative property of scalar-to-vector addition; it is equivalent to A + x.

Definition at line 2619 of file Vector.h.

◆ operator+() [6/8]

template<typename T >
GenericVector<T> pcl::operator+ ( GenericVector< T > &&  A,
const GenericVector< T > &  B 
)
inline

Returns the sum of two vectors A (rvalue reference) and B.

If the specified vectors are incompatible for vector addition (because B has less components than A), this function throws an Error exception.

Definition at line 2535 of file Vector.h.

◆ operator+() [7/8]

template<typename T , typename S >
GenericVector<T> pcl::operator+ ( GenericVector< T > &&  A,
const S &  x 
)
inline

Returns the sum of a vector A (rvalue reference) and a scalar x.

Definition at line 2592 of file Vector.h.

◆ operator+() [8/8]

template<typename T >
GenericVector<T> pcl::operator+ ( GenericVector< T > &&  A,
GenericVector< T > &&  B 
)
inline

Returns the sum of two vectors A (rvalue reference) and B (rvalue reference).

If the specified vectors are incompatible for vector addition (because B has less components than A), this function throws an Error exception.

Definition at line 2564 of file Vector.h.

◆ operator-() [1/8]

template<typename T >
GenericVector<T> pcl::operator- ( const GenericVector< T > &  A,
const GenericVector< T > &  B 
)
inline

Returns the result of subtracting a vector B from another vector A.

If the specified vectors are incompatible for vector addition (because B has less components than A), this function throws an Error exception.

Definition at line 2635 of file Vector.h.

◆ operator-() [2/8]

template<typename T , typename S >
GenericVector<T> pcl::operator- ( const GenericVector< T > &  A,
const S &  x 
)
inline

Returns the subtraction of a scalar x from a vector A.

Definition at line 2719 of file Vector.h.

◆ operator-() [3/8]

template<typename T >
GenericVector<T> pcl::operator- ( const GenericVector< T > &  A,
GenericVector< T > &&  B 
)
inline

Returns the result of subtracting a vector B (rvalue reference) from another vector A.

If the specified vectors are incompatible for vector addition (because A has less components than B), this function throws an Error exception.

Definition at line 2685 of file Vector.h.

◆ operator-() [4/8]

template<typename T , typename S >
GenericVector<T> pcl::operator- ( const S &  x,
const GenericVector< T > &  A 
)
inline

Returns the subtraction of a vector A from a scalar x.

This function exists because scalar-to-vector subtraction is not a commutative operation. A - x is not equal to x - A (the resulting vector components have the same magnitudes but opposite signs).

Definition at line 2752 of file Vector.h.

◆ operator-() [5/8]

template<typename T , typename S >
GenericVector<T> pcl::operator- ( const S &  x,
GenericVector< T > &&  A 
)
inline

Returns the subtraction of a vector A (rvalue reference) from a scalar x.

This function exists because scalar-to-vector subtraction is not a commutative operation. A - x is not equal to x - A (the resulting vector components have the same magnitudes but opposite signs).

Definition at line 2774 of file Vector.h.

◆ operator-() [6/8]

template<typename T >
GenericVector<T> pcl::operator- ( GenericVector< T > &&  A,
const GenericVector< T > &  B 
)
inline

Returns the result of subtracting a vector B from another vector A (rvalue reference).

If the specified vectors are incompatible for vector addition (because B has less components than A), this function throws an Error exception.

Definition at line 2670 of file Vector.h.

◆ operator-() [7/8]

template<typename T , typename S >
GenericVector<T> pcl::operator- ( GenericVector< T > &&  A,
const S &  x 
)
inline

Returns the subtraction of a scalar x from a vector A (rvalue reference).

Definition at line 2737 of file Vector.h.

◆ operator-() [8/8]

template<typename T >
GenericVector<T> pcl::operator- ( GenericVector< T > &&  A,
GenericVector< T > &&  B 
)
inline

Returns the result of subtracting a vector B (rvalue reference) from another vector A (rvalue reference).

If the specified vectors are incompatible for vector addition (because B has less components than A), this function throws an Error exception.

Definition at line 2708 of file Vector.h.

◆ operator/() [1/6]

template<typename T >
GenericVector<T> pcl::operator/ ( const GenericVector< T > &  A,
const GenericVector< T > &  B 
)
inline

Returns the result of the element wise division of a vector A by another vector B.

Definition at line 3027 of file Vector.h.

◆ operator/() [2/6]

template<typename T , typename S >
GenericVector<T> pcl::operator/ ( const GenericVector< T > &  A,
const S &  x 
)
inline

Returns the result of dividing a vector A by a scalar x.

Definition at line 2958 of file Vector.h.

◆ operator/() [3/6]

template<typename T , typename S >
GenericVector<T> pcl::operator/ ( const S &  x,
const GenericVector< T > &  A 
)
inline

Returns the result of dividing a scalar x by a vector A.

This function exists because scalar-to-vector division is not a commutative operation. A/x is not equal to x/A.

Definition at line 2990 of file Vector.h.

◆ operator/() [4/6]

template<typename T , typename S >
GenericVector<T> pcl::operator/ ( const S &  x,
GenericVector< T > &&  A 
)
inline

Returns the result of dividing a scalar x by a vector A (rvalue reference).

This function exists because scalar-to-vector division is not a commutative operation. A/x is not equal to x/A.

Definition at line 3011 of file Vector.h.

◆ operator/() [5/6]

template<typename T >
GenericVector<T> pcl::operator/ ( GenericVector< T > &&  A,
const GenericVector< T > &  B 
)
inline

Returns the result of the element-wise division of an r-value reference to a vector A by a vector B.

Definition at line 3059 of file Vector.h.

◆ operator/() [6/6]

template<typename T , typename S >
GenericVector<T> pcl::operator/ ( GenericVector< T > &&  A,
const S &  x 
)
inline

Returns the result of dividing a vector A (rvalue reference) by a scalar x.

Definition at line 2976 of file Vector.h.

◆ operator^() [1/8]

template<typename T >
GenericVector<T> pcl::operator^ ( const GenericVector< T > &  A,
const GenericVector< T > &  B 
)
inline

Returns the cross product of two vectors A and B.

Note
The cross product is only defined for vectors of three components. For performance reasons, this function does not check vector lengths. For vectors of length < 3, this function will invoke undefined behavior.

Definition at line 2795 of file Vector.h.

◆ operator^() [2/8]

template<typename T , typename S >
GenericVector<T> pcl::operator^ ( const GenericVector< T > &  A,
const S &  x 
)
inline

Returns the result of raising a vector A to a scalar x.

Definition at line 3071 of file Vector.h.

◆ operator^() [3/8]

template<typename T >
GenericVector<T> pcl::operator^ ( const GenericVector< T > &  A,
GenericVector< T > &&  B 
)
inline

Returns the cross product of two vectors A and B (rvalue reference).

Note
The cross product is only defined for vectors of three components. For performance reasons, this function does not check vector lengths. For vectors of length < 3, this function will invoke undefined behavior.

Definition at line 2831 of file Vector.h.

◆ operator^() [4/8]

template<typename T , typename S >
GenericVector<T> pcl::operator^ ( const S &  x,
const GenericVector< T > &  A 
)
inline

Returns the result of raising a scalar x to a vector A.

This function exists because scalar-to-vector exponentiation is not a commutative operation. A^x is not equal to x^A.

Definition at line 3103 of file Vector.h.

◆ operator^() [5/8]

template<typename T , typename S >
GenericVector<T> pcl::operator^ ( const S &  x,
GenericVector< T > &&  A 
)
inline

Returns the result of raising a scalar x to a vector A (rvalue reference).

This function exists because scalar-to-vector exponentiation is not a commutative operation. A^x is not equal to x^A.

Definition at line 3124 of file Vector.h.

◆ operator^() [6/8]

template<typename T >
GenericVector<T> pcl::operator^ ( GenericVector< T > &&  A,
const GenericVector< T > &  B 
)
inline

Returns the cross product of two vectors A (rvalue reference) and B.

Note
The cross product is only defined for vectors of three components. For performance reasons, this function does not check vector lengths. For vectors of length < 3, this function will invoke undefined behavior.

Definition at line 2812 of file Vector.h.

◆ operator^() [7/8]

template<typename T , typename S >
GenericVector<T> pcl::operator^ ( GenericVector< T > &&  A,
const S &  x 
)
inline

Returns the result of raising a vector A (rvalue reference) to a scalar x.

Definition at line 3089 of file Vector.h.

◆ operator^() [8/8]

template<typename T >
GenericVector<T> pcl::operator^ ( GenericVector< T > &&  A,
GenericVector< T > &&  B 
)
inline

Returns the cross product of two vectors A (rvalue reference) and B (rvalue reference).

Note
The cross product is only defined for vectors of three components. For performance reasons, this function does not check vector lengths. For vectors of length < 3, this function will invoke undefined behavior.

Definition at line 2851 of file Vector.h.