I'm getting compiler warnings for subscripts out of range from kamada_kawai_spring_layout.hpp.
../../../../../include/boost/graph/kamada_kawai_spring_layout.hpp:110:49:
warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
double denom = mat[0][0] * (mat[1][1] * mat[2][2] - mat[2][1] * mat[1][2])
template <>
struct linear_solver<3> {
template <typename Vec>
static Vec solve(double mat[2][2], Vec rhs) {
double denom = mat[0][0] * (mat[1][1] * mat[2][2] - mat[2][1] * mat[1][2])
- mat[1][0] * (mat[0][1] * mat[2][2] - mat[2][1] * mat[0][2])
+ mat[2][0] * (mat[0][1] * mat[1][2] - mat[1][1] * mat[0][2]);
double x_num = rhs[0] * (mat[1][1] * mat[2][2] - mat[2][1] * mat[1][2])
- rhs[1] * (mat[0][1] * mat[2][2] - mat[2][1] * mat[0][2])
+ rhs[2] * (mat[0][1] * mat[1][2] - mat[1][1] * mat[0][2]);
double y_num = mat[0][0] * (rhs[1] * mat[2][2] - rhs[2] * mat[1][2])
- mat[1][0] * (rhs[0] * mat[2][2] - rhs[2] * mat[0][2])
+ mat[2][0] * (rhs[0] * mat[1][2] - rhs[1] * mat[0][2]);
double z_num = mat[0][0] * (mat[1][1] * rhs[2] - mat[2][1] * rhs[1] )
- mat[1][0] * (mat[0][1] * rhs[2] - mat[2][1] * rhs[0] )
+ mat[2][0] * (mat[0][1] * rhs[1] - mat[1][1] * rhs[0] );
Vec result;
result[0] = x_num / denom;
result[1] = y_num / denom;
result[2] = z_num / denom;
return result;
}
};