Function libwalrus::torontonian_quad(std::vector<double>&)

Function Documentation

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

Computes the Torontonian of an input matrix.

If the output is NaN, that means that the input matrix does not have a Torontonian with physical meaning.

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

In addition, this wrapper function automatically casts all matrices to type long double, allowing for greater precision than supported by Python and NumPy.

Return

Torontonian of the input matrix

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