Added code for spr calculations (spr.h and spr.cpp)