SyTen

◆ calculate_scores()

template<typename Scalar >
std::vector<std::pair<Index, int> > syten::Delinearise::calculate_scores ( std::vector< DenseTensor< 1, Scalar > > const &  columns,
std::vector< DenseTensor< 1, Scalar > > const &  thresh 
)

Calculates the zeroness score of all columns comparing against all others.

A columns zeroness score is the number of columns beat by this column minus the number of columns which beat this column. Column A beats column B

  • if it has more exactly-zero thresholds (in thresh[A] and thresh[B] respectively)
  • or, if tied, it has more exactly-zero values (in columns[A] and columns[B] respectively)
  • or, if tied, it has more exactly-zero thresholds from the bottom in a row
  • or, if tied, it has more exactly-zero values from the bottom in a row

References count_all_zeros(), count_bottom_zeros(), and std::vector< T >::push_back().

Referenced by permute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: