tried to speed up libdai by working with sparse CPT. this did not work at this point. Here I added new files which I used for sparse manipulation