commit | ef7db84d527158272234207e8e40f78ce7e3956d | [log] [tgz] |
---|---|---|
author | Andreas Fidjeland <andreas.fidjeland@gmail.com> | Wed May 15 13:31:48 2013 +0100 |
committer | Andreas Fidjeland <andreas.fidjeland@gmail.com> | Tue May 28 17:40:07 2013 +0100 |
tree | ab99b880162a4672ac51014d4c0b183cc42a334a | |
parent | 550287fe8a047989cdbb556234e7caa9fb8416ae [diff] |
Correct computation of L0-norm The existing norm computation correctly computes the Ln-norm for n >= 1. For L0, however, the result is always inf due to the presence of the 0th root. This commit adds a special case for L0, which is computed the conventional way: by simply counting non-zero elements.