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 2854 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 2883 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 2914 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 2927 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 2900 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 2484 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 2557 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 2531 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 2588 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 2601 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 2517 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 2574 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 2546 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 2617 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 2701 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 2667 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 2734 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 2756 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 2652 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 2719 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 2690 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 3009 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 2940 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 2972 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 2993 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 3041 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 2958 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 2777 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 3053 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 2813 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 3085 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 3106 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 2794 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 3071 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 2833 of file Vector.h.