permanent
qoptcraft.math.permanent
permanent(matrix, method='glynn')
Returns the permanent of a matrix using the Ryser formula in Gray ordering.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix |
NDArray
|
A square matrix |
required |
method |
str
|
method to calculate the permanent. Options are 'glynn' and 'ryser'. Defaults to 'glynn'. |
'glynn'
|
Returns:
Name | Type | Description |
---|---|---|
Number |
Number
|
the permanent of the matrix |
Source code in qoptcraft/math/permanent.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|