From 98b8e2d43b3296c59ad7ad83d108f30d2e2af5dc Mon Sep 17 00:00:00 2001 From: Bart Slinger Date: Wed, 12 Sep 2018 20:27:08 +0200 Subject: [PATCH] formatting --- test/least_squares.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/test/least_squares.cpp b/test/least_squares.cpp index 57c7064662..46042f2d96 100644 --- a/test/least_squares.cpp +++ b/test/least_squares.cpp @@ -21,10 +21,11 @@ int main() int test_4x3() { // Start with an (m x n) A matrix - float data[12] = {20.f , -10.f , -13.f , - 17.f , 16.f , -18.f , - 0.7f, -0.8f, 0.9f, - -1.f , -1.1f, -1.2f}; + float data[12] = {20.f, -10.f, -13.f, + 17.f, 16.f, -18.f, + 0.7f, -0.8f, 0.9f, + -1.f, -1.1f, -1.2f + }; Matrix A(data); float b_data[4] = {2.0, 3.0, 4.0, 5.0}; @@ -32,7 +33,8 @@ int test_4x3() { float x_check_data[3] = {-0.69168233f, -0.26227593f, - -1.03767522f}; + -1.03767522f + }; Vector x_check(x_check_data); LeastSquaresSolver qrd = LeastSquaresSolver(A); @@ -44,19 +46,21 @@ int test_4x3() { int test_4x4() { // Start with an (m x n) A matrix - float data[16] = { 20.f , -10.f , -13.f , 21.f , - 17.f , 16.f , -18.f , -14.f , - 0.7f, -0.8f, 0.9f, -0.5f, - -1.f , -1.1f, -1.2f, -1.3f}; + float data[16] = { 20.f, -10.f, -13.f, 21.f, + 17.f, 16.f, -18.f, -14.f, + 0.7f, -0.8f, 0.9f, -0.5f, + -1.f, -1.1f, -1.2f, -1.3f + }; Matrix A(data); float b_data[4] = {2.0, 3.0, 4.0, 5.0}; Vector b(b_data); float x_check_data[4] = { 0.97893433f, - -2.80798701f, - -0.03175765f, - -2.19387649f}; + -2.80798701f, + -0.03175765f, + -2.19387649f + }; Vector x_check(x_check_data); LeastSquaresSolver qrd = LeastSquaresSolver(A);