Permanent of (0,1) Matrix using Kallman in CMEX

Computes the permanent of a (0,1) matrix.

이 제출물을 팔로우합니다

Computes the permanent of a (0,1) matrix. This implementation is in CMEX (C language for MATLAB) and is often faster than my implementation in CMEX of the Laplace expansion algorithm for matrix order, n >= 6. The latter uses recursion and has an optimization for sparse matrices. This contribution, "permKallman", is an implementation of Ralph Kallman's algorithm (1982) which applies only to (0,1) matrices. The matrices do not have to be square; in this implementation, the m-by-n input matrix is required to satisfy m <= n <= 64. Usage of this algorithm is advantageous when the matrix is sparse. In limited testing on sparse square (0,1) matrices, we found our Nijenhuis-Wilf implementation to be faster when the column weight was greater than 4 and Kallman's algorithm to be faster when the column weight was less than 4. When m > 27 and the column weight was 3, this algorithm was 1000x (or more) faster than Nijenhuis-Wilf. (See the speed testing results provided in PDF format.)
---Overflow---
All internal calculations are always carried out using uint64 values, exactly. There are no approximations and no rounding, internally. However, there is no overflow detection on the uint64 calculations! The final result is returned in the class specified and overflow and rounding warnings are provided only at this final step.

---Tested Using---
MATLAB 2015b on Windows7 using MinGW-w64 64-bit compiler (gcc 4.9.2; This compiler package is the default add-on for MATLAB 2015b.)
MATLAB 2008b on Windows7 using Microsoft Visual C++ 2008 Express Edition SP1
Failed to compile using Lcc-win32 2.4.1 (This compiler is included with MATLAB 2009a.)

인용 양식

Brian Butler (2026). Permanent of (0,1) Matrix using Kallman in CMEX (https://kr.mathworks.com/matlabcentral/fileexchange/53860-permanent-of-0-1-matrix-using-kallman-in-cmex), MATLAB Central File Exchange. 검색 날짜: .

카테고리

Help CenterMATLAB Answers에서 Sparse Matrices에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.2

Fixed compile-time errors having to do with stricmp() which is no longer supported by gcc.

1.1.0.0

* Compiled and tested using Microsoft Visual C 2008. Minor change.

1.0.0.0

* typos
* Added a figure. (I keep forgetting the figure)