add(source, target) {
    let sourceNode, targetNode;

    sourceNode = this.getNode(source);
    if(typeof target !== 'undefined') targetNode = this.getNode(target);

    if(typeof target !== 'undefined') sourceNode.adjacents.push(targetNode);

    this.nodes.set(sourceNode.data, sourceNode);
    if(typeof target !== 'undefined') this.nodes.set(targetNode.data, targetNode);

    return sourceNode;
  }
Add a relationship between two nodes

O(1)

@param source node reference or node data
@param target node reference or node data
@returns {*} resulting source node