如何在C ++中创建20000 * 20000矩阵 [英] how to create a 20000*20000 matrix in C++

查看:140
本文介绍了如何在C ++中创建20000 * 20000矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试用20000个点计算问题,所以有一个距离矩阵为20000 * 20000的元素,如何在C ++中存储此矩阵?我在具有4 GB RAM的计算机上使用Visual Studio 2008.任何建议将不胜感激.

I try to calculate a problem with 20000 points, so there is a distance matrix with 20000*20000 elements, how can I store this matrix in C++? I use Visual Studio 2008, on a computer with 4 GB of RAM. Any suggestion will be appreciated.

推荐答案

稀疏矩阵可能就是您想要的.许多问题在矩阵的每个单元中都不具有值. SparseLib ++ 是一个允许高效矩阵运算的库.

A sparse matrix may be what you looking for. Many problems don't have values in every cell of a matrix. SparseLib++ is a library which allows for effecient matrix operations.

这篇关于如何在C ++中创建20000 * 20000矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆