Compare the incoming discrete vector against a set of prevailing vectors and return the found closest prevailing integer vector
A set of real numbered unit vectors (compareVector) must be given. The integer numbered vector is compared against those and the closest integer vector overwrites the original vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | vector(:) | The given vector, will be set to the vector in compareVector that is best aligned to it. |
||
real(kind=rk), | intent(in) | :: | compareVector(:,:) | Set of unit vectors to select from against. size is (3, nVectors) |
||
real(kind=rk), | intent(out), | optional | :: | angle | angle between vectors |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | iDir | ||||
integer, | private | :: | bestIndex | ||||
real(kind=rk), | private | :: | length | ||||
real(kind=rk), | private | :: | rv(3) | ||||
real(kind=rk), | private | :: | rVectIn(3) | ||||
real(kind=rk), | private | :: | angleLoc | ||||
real(kind=rk), | private | :: | dotProduct | ||||
real(kind=rk), | private | :: | maxplen | ||||
real(kind=rk), | private | :: | min_nz_comp |