Added argmax, wrote a test.
Added code for computing, using log-probabilities.