Template Function libwalrus::hafnian_recursive¶
Defined in File recursive_hafnian.hpp
Function Documentation¶
-
template<typename
T
>
Tlibwalrus
::
hafnian_recursive
(std::vector<T> &mat)¶ Returns the hafnian of an matrix.
Returns the hafnian of a matrix using the recursive algorithm described in Counting perfect matchings as fast as Ryser [5], where it is labelled as ‘Algorithm 2’.
Modified with permission from https://github.com/eklotek/Hafnian.
- Return
hafnian of the input matrix
- Parameters
mat
: a flattened vector of size \(n^2\), representing an \(n\times n\) row-ordered symmetric matrix.
libwalrus_cpp_api/function_namespacelibwalrus_1a010c7164aaa459ada49504168eacd14e
Download Python script
Download Notebook
View on GitHub
Contents
Downloads