Minor tidying up of sampleTriple
Add comment for future reference
Add bitwise set operations, with checking to compare to previous version
Remove non-bitwise code

Might be useful to use non-bitwise code for small graphs though...
Use implemention of logsumexp in C