Add function and test for computing a BoxSum vector