algos/irving.js
//deleted person will then remove whoever just removed them from their list
deleted person will then remove whoever just removed them from their list
deleted person will then remove whoever just removed them from their list
function reduceStableTables(proposalTable, preferenceTable) {
  let prefTable = cloneDeep(preferenceTable);
  for (const person in proposalTable) {
    const currPartner = proposalTable[person];
    const removedArr = prefTable[person].splice(prefTable[person].indexOf(currPartner) + 1);
    removedArr.forEach((removedPerson) => {
      prefTable[removedPerson].splice(prefTable[removedPerson].indexOf(person), 1);
    });
  }
  return prefTable;
}
function reduceStableTables ( proposalTable , preferenceTable ) { let prefTable = cloneDeep ( preferenceTable ) ; for ( const person in proposalTable ) { const currPartner = proposalTable [ person ] ; const removedArr = prefTable [ person ] . splice ( prefTable [ person ] . indexOf ( currPartner ) + 1 ) ; removedArr . forEach ( ( removedPerson ) => { prefTable [ removedPerson ] . splice ( prefTable [ removedPerson ] . indexOf ( person ) , 1 ) ; } ) ; } return prefTable ; }
deleted person will then remove whoever just removed them from their list
deleted person will then remove whoever just removed them from their list