Ultrafast all-optical switch using complex refractive index changes of thin films containing photochromic dye