gpt4 book ai didi

c++ - 具有连续存储的动态矩阵

转载 作者:搜寻专家 更新时间:2023-10-31 01:58:45 26 4
gpt4 key购买 nike

我想要一个矩阵容器类,它具有与 vector > 类似的功能,但将元素存储在连续的内存中。我敢打赌标准库中没有(包括 C++0x); Boost 提供吗?

最佳答案

您似乎想要误导性命名的 Boost Matrix .

The templated class matrix is the base container adaptor for dense matrices. For a (m x n)-dimensional matrix and 0 <= i < m, 0 <= j < n every element mi, j is mapped to the (i x n + j)-th element of the container for row major orientation or the (i + j x m)-th element of the container for column major orientation.

关于c++ - 具有连续存储的动态矩阵,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3742526/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com