function updateLinkedByIndexArray(inputData){
  //reset the array
  linkedByIndex = {}
  //create the array data
  for (var i = 0; i < inputData.nodes.length; i++) {
      linkedByIndex[i + "," + i] = 1;
  };
  inputData.links.forEach(function (d) {
    //alert(d.source.index + "," + d.target.index);
      linkedByIndex[d.source.index + "," + d.target.index] = 1;
  });
}
//this function creates an updated version of the linked by index array - depending on what nodes/links are showing
this function creates an updated version of the linked by index array - depending on what nodes/links are showing
this function creates an updated version of the linked by index array - depending on what nodes / links are showing
function updateLinkedByIndexArray(inputData){
  linkedByIndex = {}
  for (var i = 0; i < inputData.nodes.length; i++) {
      linkedByIndex[i + "," + i] = 1;
  };
  inputData.links.forEach(function (d) {
      linkedByIndex[d.source.index + "," + d.target.index] = 1;
  });
}
function updateLinkedByIndexArray ( inputData ) { linkedByIndex = { } for ( var i = 0 ; i < inputData . nodes . length ; i ++ ) { linkedByIndex [ i + "," + i ] = 1 ; } ; inputData . links . forEach ( function ( d ) { linkedByIndex [ d . source . index + "," + d . target . index ] = 1 ; } ) ; }
this function creates an updated version of the linked by index array - depending on what nodes/links are showing
this function creates an updated version of the linked by index array - depending on what nodes / links are showing
//reset the array //create the array data //alert(d.source.index + "," + d.target.index);