code: function markCycles() {
      for (var n = 0; n < nodes.length; n++) {
        if (!nodes[n].sourceLinks.length && !nodes[n].targetLinks.length) {
          nodes.splice(n, 1);
          n--;
        }
      }
  
      var addedLinks = [];
      links.forEach(function(link) {
        if (createsCycle(link.source, link.target, addedLinks)) {
          link.causesCycle = true;
        } else {
          addedLinks.push(link);
        }
      });
    }
docs: Comes from https://github.com/cfergus/d3-plugins /* Cycle Related computations