Is there a windows phone 8.0 platform matrix type?

I am developing a Windows Phone 8.0 public API that is actually a wrapper around C++ written in C++/CX and should interface to C# (or C++/CX). I need to return a matrix object(which is a OpenCV cv::Mat originally) to client somehow. Attempts to find WP platform matrix type were unsuccessful.

What should be the best way to present the matrix object to a client?

There seems to be a Windows::Foundation::Numerics::Matrix4x4 and Matrix3x2 types but they are only available on Win 10 and not on WP 8.0.

I was thinking of using Windows::UI::Xaml::Media::Matrix but I don't want to use a XAML object.

Is there some generic Matrix type on WP 8.0 platform that I can use or should I just return an array of doubles or something?

Answers


OpenCV cv::Mat originally

n-dimensional dense numerical single-channel or multi-channel array? Sorry, no built-in class exist regardless on the Windows version.

Matrix4x4 and Matrix3x2 types

they’re completely different from cv::Mat. They are comparable to cv::Matx<float, 4, 4> and cv::Matx<float, 3, 2>

If you only need small matrices like float 4x4 where size is known at compile time, you can borrow the structures from MonoGame. The license is OK, it's MS-PL, however the quality isn’t ideal: generally works, but prepare to fix some occasional bugs.


Need Your Help

How to detect overflow in one's complement system?

assembly computer-architecture digital-logic

In one's complement system in order to show negative binary number we simply complement each bit. Fore example :