def changeThreeStar(G, A, i):
    """
    Change statistic for three-star

      o
     /
    *--o
     \
      o
    """
    return ( G.degree(i) * (G.degree(i) - 1) * (G.degree(i) - 2) / 6.0
             if G.degree(i) > 2 else 0 )