Matlab sub2ind / ind2sub in OpenCV /c++
Are there any functions in OpenCV which are equal to Matlab's sub2ind and ind2sub functions? I need both fuctions for my C++ app. If OpenCV lacks of these functions, are there any C++ libs which provide equivalent functionality?