An Algorithm for Calculating Isoelectronic Changes in Energies, Densities, and One-Matrices