code: private void addMsgs(VarTensor[] msgs, Tensor t, int tf) {
          assert msgs[0].getAlgebra().equals(t.getAlgebra());
          EdgeScores es = EdgeScores.tensorToEdgeScores(t);
          for (VarTensor msg : msgs) {
              LinkVar link = (LinkVar) msg.getVars().get(0);
              double val = es.getScore(link.getParent(), link.getChild());
              msg.addValue(tf, val);
          }
      }
docs: Adds to messages on a Messages[].
  
  @param msgs The output messages.
  @param t The input messages.
  @param tf Whether to set TRUE or FALSE messages.