Armadillo 是否支持布尔和 8 位类型的矩阵和立方体?

Does Armadillo support boolean and 8-bit type matrices and cubes?

arma docs 中,我只能看到 cubes/mats 具有 intshortlong 等类型。但没有 ucharbool,这对于存储图像或蒙版很有用。

快速浏览 git repo,我看到了术语 ARMA_U8_TYPE,但试图通过以下方式初始化多维数据集:

cube<ARMA_U8_TYPE> my_cube;

或者

cube<uchar> my_cube;

导致错误,指出这些类型不是模板的一部分。

有什么方法可以初始化 ucharbool 类型的矩阵吗?例如。调整 config.hpp 文件?

P.S。我是 64 位 Linux 机器上的 运行 C++11。

嗯...已经有 uchar 矩阵的 typedef

来自

https://github.com/conradsnicta/armadillo-code/blob/unstable/include/armadillo_bits/typedef_mat.hpp

typedef Mat <unsigned char> uchar_mat;
typedef Col <unsigned char> uchar_vec;
typedef Col <unsigned char> uchar_colvec;
typedef Row <unsigned char> uchar_rowvec;
typedef Cube<unsigned char> uchar_cube;

更新

而且我不相信布尔矩阵(我的意思是压缩矩阵,比如 std::vector)会被支持,除非使用完全专用的代码