lib/sbm.js
function(matrix) {
    // if not square
    if (matrix.x != matrix.y) {
      return
    }
    // return trace
    return _.filter(matrix.data, function (line, number) {
      return _.includes(line, number)
    }).length
  }
function(matrix) {
    // if not square
    if (matrix.x != matrix.y) {
      return
    }
    // return trace
    return _.filter(matrix.data, function (line, number) {
      return _.includes(line, number)
    }).length
  }
function ( matrix ) { // if not square if ( matrix . x != matrix . y ) { return } // return trace return _ . filter ( matrix . data , function ( line , number ) { return _ . includes ( line , number ) } ) . length }
computes the trace of the matrix
computes the trace of the matrix