A monte carlo pin cell spectral code for nuclear engineering applications.
|
Utility functions for commonly used vector operations. More...
Go to the source code of this file.
Functions | |
template<typename T > | |
T | dotProduct2D (T x1, T y1, T x2, T y2) |
Computes the dot product of two vectors in the 2D cartesian space. More... | |
template<typename T > | |
T | dotProduct3D (T x1, T y1, T z1, T x2, T y2, T z2) |
Computes the dot product of two vectors in 3D cartesian space. More... | |
template<typename T > | |
T | norm2D (T x, T y) |
Computes the norm of a vector in the 2D cartesian space. More... | |
template<typename T > | |
T | norm3D (T x, T y, T z) |
Computes the norm of a vector in 3D cartesiance space. More... | |
Utility functions for commonly used vector operations.
T dotProduct2D | ( | T | x1, |
T | y1, | ||
T | x2, | ||
T | y2 | ||
) |
Computes the dot product of two vectors in the 2D cartesian space.
This method computes the scalar product of two 2D vectors as follows:
x1 | the x-coodinate of the first vector |
y1 | the y-coordinate of the first vector |
x2 | the x-coordinate of the second vector |
y2 | the y-coordinate of the second vector |
T dotProduct3D | ( | T | x1, |
T | y1, | ||
T | z1, | ||
T | x2, | ||
T | y2, | ||
T | z2 | ||
) |
Computes the dot product of two vectors in 3D cartesian space.
This method computes the scalar product of two 3D vectors as follows:
x1 | the x-coodinate of the first vector |
y1 | the y-coordinate of the first vector |
z1 | the z-coordinate of the first vector |
x2 | the x-coordinate of the second vector |
y2 | the y-coordinate of the second vector |
z2 | the z-coordinate of the second vector |
T norm2D | ( | T | x, |
T | y | ||
) |
Computes the norm of a vector in the 2D cartesian space.
This method computes the norm of a vector in 2D as follows:
x | the x-coordinate of the vector |
y | the y-coordinate of the vector |
T norm3D | ( | T | x, |
T | y, | ||
T | z | ||
) |
Computes the norm of a vector in 3D cartesiance space.
This method computes the norm of a vector in 3D as follows:
x | the x-coordinate of the vector |
y | the y-coordinate of the vector |
z | the z-coordinate of the vector |