Closed rtrangucci closed 9 years ago
The positive definiteness check should also check that the matrix is square.
On Mar 31, 2015, at 10:33 PM, Rob Trangucci notifications@github.com wrote:
Checks in matrix functions not ordered correctly; e.g.
mdivide_left_spd.hpp:
stan::math::check_symmetric("mdivide_left_spd", "A", A); stan::math::check_pos_definite("mdivide_left_spd", "A", A); stan::math::check_square("mdivide_left_spd", "A", A); stan::math::check_multiplicable("mdivide_left_spd", "A", A, "b", b);
@syclik pointed out we should be checking whether the two matrices are multiplicable before we run the check_pos_definite test. Check_pos_definite also already checks symmetry internally, so no need to call it twice.
— Reply to this email directly or view it on GitHub.
@bob-carpenter I should have added that check_pos_definite calls check_symmetric which subsequently calls check_square, so there only need to be two checks in mdivide_left_spd(A,b):
check_multiplicable(A,b)
check_pos_defininte(A)
This issue was moved to stan-dev/math#88
Checks in matrix functions not ordered correctly; e.g.
mdivide_left_spd.hpp:
@syclik pointed out we should be checking whether the two matrices are multiplicable before we run the check_pos_definite test. Check_pos_definite also already checks symmetry internally, so no need to call it twice.