From 4c824ff6e6d0a755a1f9d036f1299e8b32499ac2 Mon Sep 17 00:00:00 2001 From: Thomas Otto Date: Wed, 16 Jul 2014 19:12:52 +0200 Subject: [PATCH] fix matrix size for 3-dimensional linear solver --- boost/graph/kamada_kawai_spring_layout.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boost/graph/kamada_kawai_spring_layout.hpp b/boost/graph/kamada_kawai_spring_layout.hpp index a11a989..b7c9a3e 100644 --- a/boost/graph/kamada_kawai_spring_layout.hpp +++ b/boost/graph/kamada_kawai_spring_layout.hpp @@ -106,7 +106,7 @@ namespace boost { template <> struct linear_solver<3> { template - static Vec solve(double mat[2][2], Vec rhs) { + static Vec solve(double mat[3][3], 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]); -- 1.7.10.4