code: function _initializeLinks(graphLinks, config) {
      return graphLinks.reduce((links, l) => {
          const source = l.source.id !== undefined && l.source.id !== null ? l.source.id : l.source;
          const target = l.target.id !== undefined && l.target.id !== null ? l.target.id : l.target;
  
          if (!links[source]) {
              links[source] = {};
          }
  
          if (!links[target]) {
              links[target] = {};
          }
  
          const value = config.collapsible && l.isHidden ? 0 : l.value || 1;
  
          links[source][target] = value;
  
          if (!config.directed) {
              links[target][source] = value;
          }
  
          return links;
      }, {});
  }
docs: Receives a matrix of the graph with the links source and target as concrete node instances and it transforms it
  in a lightweight matrix containing only links with source and target being strings representative of some node id
  and the respective link value (if non existent will default to 1).
  @param  {Array.<Link>} graphLinks - an array of all graph links.
  @param  {Object} config - the graph config.
  @returns {Object.<string, Object>} an object containing a matrix of connections of the graph, for each nodeId,
  there is an object that maps adjacent nodes ids (string) and their values (number).
  @memberof Graph/helper