问题标签 [determinants]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c - 在C中找到矩阵的行列式
这是矩阵行列式的 C 代码,但它给出了编译错误。
代码是:
编译错误是:
我认为错误在于二维数组的传递。当我将它作为指针传递时,它会给出警告但没有错误,但它不会给出正确的结果,因为总是将行列式设为零。所以我猜这个数组并没有被传递,当我在函数行列式中打印它时它也不会打印。请帮忙,因为我在我的项目中被困住了。
algorithm - m对角NxN对称矩阵行列式的高效算法
我必须找到具有 M 对角线和 的对称正方形 NxN 矩阵的行列式M << N
。有比 LU 分解矩阵更快的方法吗?
c# - 计算矩阵行列式的下一步
我正在编写一种方法来计算包含双精度的矩阵(此处为二维数组)的行列式。这是我写的:
我缺少的是应该去的线fill cofactor
。
有人可以建议我应该在那里做什么吗?基本上,从原始矩阵添加元素到辅因子的最佳方法是什么,同时忽略出现在矩阵中我当前位置的行或列中的元素?
python - 查找作为列表列表输入的 N x N 矩阵的行列式 - “列表索引超出范围”
我正在尝试编写一个程序来查找 Python 3.3 中 NxN 矩阵的行列式,但它返回“列表索引超出范围”错误。det 函数中有一个调试打印语句,表明在给出的 2 x 2 矩阵示例的情况下,它适用于第一个未成年人,但随后 A 减少到 [[3]] 并且我看不到我的代码的哪一部分正在改变它?我希望 det 函数保持 A 不变,因为它沿第一行工作。
python-2.7 - Python:求解方程组(系数是数组)
我可以像这样求解一个系统方程(使用 NumPY):
但是,如果我得到这样的东西:
它不起作用,其中矩阵的系数是数组,我想为数组“x”的每个元素计算数组解“y”。另外,我无法计算
问题是:如何做到这一点?
c++ - 通过高斯消元 C++ 确定矩阵的行列式
我试图找到找到方阵行列式的代码,我遇到了这个代码。
但我无法理解第 20-29 行,即从另一行的多个行中减去行的位置。我的意思是为什么这里需要while循环?当我减去 quotient*dividend 时,它应该始终为 0 ,对吗?所以我认为它应该只是一次迭代。那么,为什么我们需要执行这个mat[row].swap(mat[col]);
操作呢?提前致谢。
c# - 计算 NxN 递归 C# 的数组行列式
嗯,这让我很头疼。我正在构建一个矩阵行列式函数来计算 NxN 行列式,并且我正在使用递归。逻辑工作正常,但我无法正确计算最终值。
这是我的矩阵行列式代码:
而关于fillNewArr方法,它只是一种修剪数组的方法,方法如下:p
该方法按“我假设”的方式工作,但最终结果没有以正确的方式计算,为什么会这样?!
4x4 阵列示例:
最终结果应该是-168,而我的是104!
python - 如何找到 2x2 矩阵的行列式?
它必须是d-b c 这是我的代码,但它说 aList 没有定义
objective-c - 4x4 矩阵的行列式算法
我选择第一行并将每个元素乘以其辅因子,但在某些情况下,该方法返回nan
. 例如,
在这种情况下,该方法返回nan
.
有谁知道我做错了什么?
getDet3
返回 3x3 矩阵的行列式,它工作正常。
algorithm - Fastest algorithm for computing the determinant of a matrix?
For a research paper, I have been assigned to research the fastest algorithm for computing the determinant of a matrix.
I already know about LU decomposition and Bareiss algorithm which both run in O(n^3), but after doing some digging, it seems there are some algorithms that run somewhere between n^2 and n^3.
This source (see page 113-114) and this source (see page 198) say that an algorithm exists that runs in O(n^2.376) because it is based on the Coppersmith-Winograd's algorithm for multiplying matrices. However, I have not been able to find any details on such an algorithm.
My questions are:
- What is the fastest created (non-theoretical) algorithm for computing the determinant of a matrix?
- Where can I find information about this fastest algorithm?
Thanks so much.