Function libwalrus::permanent_fsum

Function Documentation

double libwalrus::permanent_fsum(std::vector<double> &mat)

Returns the permanent of a matrix using Ryser’s algo with Gray code ordering with fsum

This is a wrapper around the templated function libwalrus::perm_fsum for Python integration. It accepts and returns double numeric types, and returns sensible values for empty and non-even matrices.

Return

the permanent

Parameters
  • mat: vector representing the flattened matrix