Finds an element of the table which is closest to the specified value.
IppStatus ippsFindNearestOne_16u(Ipp16u inpVal, Ipp16u* pOutVal, int* pOutIndex, const Ipp16u *pTable, int tblLen);
inpVal |
Reference value. |
pOutVal |
Pointer to the output value. |
pOutIndx |
Pointer to the output index. |
pTable |
Pointer to the table for searching. |
tblLen |
Number of elements in the table. |
The function ippsFindNearestOne is declared in the ipps.h file. This function searches through the table pTable for an element which is closest to the specified reference value inpVal. The resulting element and its index are stored in pOutVal and pOutIndex, respectively. The table elements must satisfy the condition pTable[n] ≤ pTable[n+1]. The function uses the following distance criterion for determining the table closest element closest: min(|inpVal -pTable[n]|).
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when at least one of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error when tblLen is less than or equal to 0. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.