code: public void calcExpectation(double[] expected, double Z, int size)
      {
          double c = Math.exp(alpha + beta - cost - Z);
          for (int i = 0; fVector.get(i) != -1; i++)
          {
              int idx = fVector.get(i) + y;
              expected[idx] += c;
          }
          for (Path p : lpath)
          {
              p.calcExpectation(expected, Z, size);
          }
      }
docs: 计算节点期望
  
  @param expected 输出期望
  @param Z        规范化因子
  @param size     标签个数