MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / TYPED_TEST

Function TYPED_TEST

test/pinverse.cpp:126–133  ·  view source on GitHub ↗

Test Moore-Penrose conditions in the following first 4 tests See https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse#Definition

Source from the content-addressed store, hash-verified

124// Test Moore-Penrose conditions in the following first 4 tests
125// See https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse#Definition
126TYPED_TEST(Pinverse, AApinvA_A) {
127 SUPPORTED_TYPE_CHECK(TypeParam);
128 array in = readTestInput<TypeParam>(
129 string(TEST_DIR "/pinverse/pinverse10x8.test"));
130 array inpinv = pinverse(in);
131 array out = matmul(in, inpinv, in);
132 ASSERT_ARRAYS_NEAR(in, out, eps<TypeParam>());
133}
134
135TYPED_TEST(Pinverse, ApinvAApinv_Apinv) {
136 SUPPORTED_TYPE_CHECK(TypeParam);

Callers

nothing calls this directly

Calls 4

HMethod · 0.80
TMethod · 0.80
pinverseFunction · 0.50
matmulFunction · 0.50

Tested by

no test coverage detected