code: function _getLinks(nodes) {
    var links = [],
        nodeHash;
  
    nodeHash = nodes.reduce(function (obj, node) {
      obj[node.id] = node;
      return obj;
    }, {});
  
    _data.links.forEach(function (link) {
      var source = nodeHash[link.sourceId],
          target = nodeHash[link.targetId];
      if(source && target) {
        link.setProperties({
          source: source,
          target: target,
          isBackwardLink: source.isSelfOrAncestor(target)
        });
        links.push(link);
      }
    });
  
    return links;
  }
docs: Create a list of all links connecting nodes in the given array.
  @param nodes {Array} A list of d3 nodes created by tree layout
  @return links {Array} All links between nodes in the current DAG