Template Function libwalrus::perm_fsum

Function Documentation

template<typename T>
double libwalrus::perm_fsum(std::vector<T> &mat)

Returns the permanent of an matrix using fsum.

Returns the permanent of a matrix using Ryser’s algorithm with Gray code ordering.

Return

permanent of the input matrix

Parameters
  • mat: a flattened vector of size \(n^2\), representing an \(n\times n\) row-ordered symmetric matrix.