private void initializeGraphAsEmpty(){
  int max=Math.max(getMaxInDegree() + getMaxOutDegree(),getMaxDegree());
  max+=1;
  parentMatrix=new int[getNumNodes()][max];
  childMatrix=new int[getNumNodes()][max];
  for (int i=0; i < getNumNodes(); i++) {
    parentMatrix[i][0]=1;
    childMatrix[i][0]=1;
  }
  for (int i=0; i < getNumNodes(); i++) {
    for (int j=1; j < max; j++) {
      parentMatrix[i][j]=-5;
      childMatrix[i][j]=-5;
    }
  }
}

private void initializeGraphAsEmpty ( ) { int max = Math . max ( getMaxInDegree ( ) + getMaxOutDegree ( ) , getMaxDegree ( ) ) ; max += 1 ; parentMatrix = new int [ getNumNodes ( ) ] [ max ] ; childMatrix = new int [ getNumNodes ( ) ] [ max ] ; for ( int i = 0 ; i < getNumNodes ( ) ; i ++ ) { parentMatrix [ i ] [ 0 ] = 1 ; childMatrix [ i ] [ 0 ] = 1 ; } for ( int i = 0 ; i < getNumNodes ( ) ; i ++ ) { for ( int j = 1 ; j < max ; j ++ ) { parentMatrix [ i ] [ j ] = - 5 ; childMatrix [ i ] [ j ] = - 5 ; } } }
initializes the graph to have no edges .
