Template Function libwalrus::torontonian

Function Documentation

template<typename T>
T libwalrus::torontonian(std::vector<T> &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 function uses OpenMP (if available) to parallelize the reduction.

Return

Torontonian of the input matrix

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