code: private void addToGraph(ClassDoc cd) {
  	// avoid adding twice the same class, but don't rely on cg.getClassInfo
  	// since there are other ways to add a classInfor than printing the class
  	if (visited.contains(cd.toString()))
  	    return;
  
  	visited.add(cd.toString());
  	cg.printClass(cd, false);
  	cg.printRelations(cd);
  	if (opt.inferRelationships)
  	    cg.printInferredRelations(cd);
  	if (opt.inferDependencies)
  	    cg.printInferredDependencies(cd);
      }
docs: Adds the specified class to the internal class graph along with its
  relations and dependencies, eventually inferring them, according to the
  Options specified for this matcher
  @param cd