src/fisher.cpp
// Output:
// a: the state of the source.
// b: the state of the target.
the state of the source.
b: the state of the target.
the state of the source . b : the state of the target .
void edgestate(Tree &T, long e, State &sth, State &stl, long &a, long &b) {
  a = sth.s[T.edges[e].s - T.nleaves];      
  if (T.edges[e].t < T.nleaves){            
    b = stl.s[T.edges[e].t];                
  } else {
    b = sth.s[T.edges[e].t - T.nleaves];    
  }
}
void edgestate ( Tree & T , long e , State & sth , State & stl , long & a , long & b ) { a = sth . s [ T . edges [ e ] . s - T . nleaves ] ; if ( T . edges [ e ] . t < T . nleaves ) { b = stl . s [ T . edges [ e ] . t ] ; } else { b = sth . s [ T . edges [ e ] . t - T . nleaves ] ; } }
Output:
a: the state of the source.
Output : a : the state of the source .
// state on the source node // if the edge connects to a leaf // state on the target leaf // state on the target node