Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Algorithm 读取矩阵的算法_Algorithm_Matrix_Time Series_Code Complexity - Fatal编程技术网

Algorithm 读取矩阵的算法

Algorithm 读取矩阵的算法,algorithm,matrix,time-series,code-complexity,Algorithm,Matrix,Time Series,Code Complexity,一种算法,需要处理一个可伸缩的矩阵nxm。 例如,我有一个3秒的时间序列,包含值:2,1,4。 我需要将其分解为一个3x4矩阵,其中3是时间序列的元素数,4是最大值。生成的矩阵如下所示: 1 1 1 1 0 1 0 0 1 0 0 1 这是一个糟糕的解决方案还是仅仅被认为是一个数据输入问题? 问题是, 我是否需要在不丢失值的情况下从矩阵的每一行分发各种元素的信息?填充矩阵背后的逻辑是什么?每条线将分别发送到一个配电网络元素。它们没有数据依赖性。此外,最终和是分解

一种算法,需要处理一个可伸缩的矩阵
nxm
。 例如,我有一个3秒的时间序列,包含值:2,1,4。 我需要将其分解为一个
3x4
矩阵,其中3是时间序列的元素数,4是最大值。生成的矩阵如下所示:

1   1   1
1   0   1
0   0   1
0   0   1
这是一个糟糕的解决方案还是仅仅被认为是一个数据输入问题? 问题是,


我是否需要在不丢失值的情况下从矩阵的每一行分发各种元素的信息?

填充矩阵背后的逻辑是什么?每条线将分别发送到一个配电网络元素。它们没有数据依赖性。此外,最终和是分解后的序列。分布式系统将基于此系列生成请求。所以最后,我需要一个原创的系列。但是我的算法的分解是O(n^2),这是不可行的。如果你想缩放解决方案以生成一个NxM矩阵,根据定义,复杂度不能低于O(n²)。