Template Function libwalrus::torontonian_fsum

Function Documentation

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

Computes the Torontonian of an input matrix using the Shewchuck algorithm, a significantly more accurate summation algorithm.

Note that the fsum implementation currently only allows for double precision, and precludes use of OpenMP parallelization.

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

Return

Torontonian of the input matrix

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