public void addArc(String sParent,ArrayList<Integer> nodes) throws Exception {
  int nParent=getNode(sParent);
  if (m_bNeedsUndoAction) {
    addUndoAction(new AddArcAction(nParent,nodes));
  }
  boolean bNeedsUndoAction=m_bNeedsUndoAction;
  m_bNeedsUndoAction=false;
  for (int iNode=0; iNode < nodes.size(); iNode++) {
    int nNode=nodes.get(iNode);
    addArc(nParent,nNode);
  }
  m_bNeedsUndoAction=bNeedsUndoAction;
}

public void addArc ( String sParent , ArrayList < Integer > nodes ) throws Exception { int nParent = getNode ( sParent ) ; if ( m_bNeedsUndoAction ) { addUndoAction ( new AddArcAction ( nParent , nodes ) ) ; } boolean bNeedsUndoAction = m_bNeedsUndoAction ; m_bNeedsUndoAction = false ; for ( int iNode = 0 ; iNode < nodes . size ( ) ; iNode ++ ) { int nNode = nodes . get ( iNode ) ; addArc ( nParent , nNode ) ; } m_bNeedsUndoAction = bNeedsUndoAction ; }
add arc between parent node and each of the nodes in a given list . distributions are updated as above .
