MCPcopy Create free account
hub / github.com/cp-algorithms/cp-algorithms / test2

Function test2

test/test_gauss.cpp:20–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void test2(){
21 //x + y = 0
22 //2x + 3y = 1
23 matrix A = {{1, 1}, {2, 3}};
24 vec b = {0, 1};
25 vec ans(2);
26 A[0].push_back(b[0]);
27 A[1].push_back(b[1]);
28 assert(gauss(A, ans) == 1);
29 assert(abs(ans[0] + 1) < EPS && abs(ans[1] - 1) < EPS);
30}
31
32void test3(){
33 //x = 0

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected