******************************** ORTHOGONAL_TRANSFORMER_MINIMIZER tests select one 1 - Complex syetem matrix 2 - Real system matrix ******************************* ******************************** Testing Complex system ******************************** ---------------- NAG tests f01rcc System matrix before QR factorization BASIC_MATRIX [5 x 3], blended complex: Row/Col 1 2 1 0.0000e+000, 5.0000e-001 -5.0000e-001, 1.5000e+000 2 4.0000e-001, 3.0000e-001 9.0000e-001, 1.3000e+000 3 4.0000e-001, 0.0000e+000 -4.0000e-001, 4.0000e-001 4 3.0000e-001, -4.0000e-001 1.0000e-001, 7.0000e-001 5 0.0000e+000, -3.0000e-001 3.0000e-001, 3.0000e-001 Row/Col 3 1 -1.0000e+000, 1.0000e+000 2 2.0000e-001, 1.4000e+000 3 1.8000e+000, 0.0000e+000 4 0.0000e+000, 0.0000e+000 5 0.0000e+000, 2.4000e+000 Details of QR factorization BASIC_MATRIX [5 x 3], blended complex: Row/Col 1 2 1 1.0000e+000, 0.0000e+000 1.0000e+000, 1.0000e+000 2 -2.0000e-001, -4.0000e-001 -2.0000e+000, 0.0000e+000 3 -3.2000e-001, -1.6000e-001 -3.5054e-001, 2.6291e-001 4 -4.0000e-001, 2.0000e-001 5.5511e-017, 5.4772e-001 5 -1.2000e-001, 2.4000e-001 1.9718e-001, 2.6291e-001 Row/Col 3 1 1.0000e+000, 1.0000e+000 2 -1.0000e+000, -1.0000e+000 3 -3.0000e+000, 0.0000e+000 4 -8.7771e-017, 2.9257e-017 5 -2.1943e-017, 6.3246e-001 Auxiliary vector zeta BASIC_VECTOR <3|, blended complex: Index # Values 1 1.0000e+000, 5.0000e-001 1.0954e+000, -3.3333e-001 3 1.2649e+000, 2.3130e-017 ---------------- NAG tests f01rec Explicit form of the transformer matrix Q BASIC_MATRIX [5 x 5], blended complex: Row/Col 1 2 1 0.0000e+000, 5.0000e-001 0.0000e+000, -5.0000e-001 2 4.0000e-001, 3.0000e-001 -4.0000e-001, -3.0000e-001 3 4.0000e-001, 0.0000e+000 4.0000e-001, 1.1102e-016 4 3.0000e-001, -4.0000e-001 3.0000e-001, -4.0000e-001 5 0.0000e+000, -3.0000e-001 8.3267e-017, -3.0000e-001 Row/Col 3 4 1 2.7756e-017, 5.5511e-017 5.0000e-001, 2.7756e-017 2 6.5184e-018, 8.2002e-018 -3.0000e-001, 4.0000e-001 3 -6.0000e-001, 2.6411e-018 -2.4000e-001, -3.2000e-001 4 7.3615e-017, -5.8728e-017 5.0000e-001, 4.1633e-017 5 -1.6523e-017, -8.0000e-001 -2.4000e-001, 1.8000e-001 Row/Col 5 1 4.0000e-001, 3.0000e-001 2 -4.8000e-001, 1.4000e-001 3 1.3878e-017, 4.0000e-001 4 -4.0000e-001, -3.0000e-001 5 3.0000e-001, 0.0000e+000 ---------------- NAG tests f01rdc Matrix B to be transformed BASIC_MATRIX [5 x 2], blended complex: Row/Col 1 2 1 -5.5000e-001, 1.0500e+000 4.5000e-001, 1.0500e+000 2 4.9000e-001, 9.3000e-001 1.0900e+000, 1.3000e-001 3 5.6000e-001, -1.6000e-001 6.4000e-001, 1.6000e-001 4 3.9000e-001, 2.3000e-001 -3.9000e-001, -2.3000e-001 5 1.1300e+000, 8.3000e-001 -1.1300e+000, 7.7000e-001 B = (Q conjugated transposed) * B BASIC_MATRIX [5 x 2], blended complex: Row/Col 1 2 1 1.0000e+000, 1.0000e+000 1.0000e+000, -1.0000e+000 2 -1.0000e+000, 0.0000e+000 -1.0000e+000, 2.2204e-016 3 -1.0000e+000, 1.0000e+000 -1.0000e+000, -1.0000e+000 4 -6.0000e-002, -2.0000e-002 -4.0000e-002, 1.2000e-001 5 4.0000e-002, 1.2000e-001 -6.0000e-002, 2.0000e-002 Matrix B after transformation: B = Q * B BASIC_MATRIX [5 x 2], blended complex: Row/Col 1 2 1 3.3800e-001, 2.6600e-001 -1.3380e+000, -4.6600e-001 2 -1.3196e+000, -4.1720e-001 1.1160e-001, -4.3880e-001 3 -7.1200e-001, 1.1600e+000 -5.6000e-002, 1.0400e-001 4 7.6600e-001, 6.2000e-002 1.4220e+000, -3.4600e-001 5 6.7000e-001, -1.6600e-001 2.7800e-001, -7.5800e-001 Testing feature 'solution' - made up data.. Assuming complex solution = A |x> BASIC_VECTOR |5>, blended complex: Index # Values 1 -1.0000e+000, 1.5000e+000 6.0000e-001, 1.7000e+000 3 2.2000e+000, 0.0000e+000 3.0000e-001, -4.0000e-001 5 0.0000e+000, 2.1000e+000 Now seeking |x> which minimizes |b> - A|x> Should be close to {1+i0, 0+i0, 1+i0) BASIC_VECTOR |3>, blended complex: Index # Values 1 1.0000e+000, 2.2204e-016 -5.5511e-017, 1.1102e-016 3 1.0000e+000, 1.4803e-017 ******************************** Testing Real system ******************************** ---------------- NAG tests f01qcc - see Nag manual System matrix before QR factorization BASIC_MATRIX [5 x 3], real: Row/Col 1 2 3 1 2.0000e+000 2.5000e+000 2.5000e+000 2 2.0000e+000 2.5000e+000 2.5000e+000 3 1.6000e+000 -4.0000e-001 2.8000e+000 4 2.0000e+000 -5.0000e-001 5.0000e-001 5 1.2000e+000 -3.0000e-001 -2.9000e+000 Details of QR factorization BASIC_MATRIX [5 x 3], real: Row/Col 1 2 3 1 -4.0000e+000 -2.0000e+000 -3.0000e+000 2 4.0825e-001 -3.0000e+000 -2.0000e+000 3 3.2660e-001 -4.6188e-001 -4.0000e+000 4 4.0825e-001 -5.7735e-001 -8.7771e-017 5 2.4495e-001 -3.4641e-001 -6.3246e-001 Auxiliary vector zeta BASIC_VECTOR <3|, real: Index # Values 1 1.2247e+000 1.1547e+000 1.2649e+000 ---------------- NAG tests f01qec - see Nag manual Explicit form of the transformer matrix Q BASIC_MATRIX [5 x 5], real: Row/Col 1 2 3 4 5 1 -5.0000e-001 -5.0000e-001 -6.7987e-017 -5.0000e-001 -5.0000e-001 2 -5.0000e-001 -5.0000e-001 4.1436e-017 5.0000e-001 5.0000e-001 3 -4.0000e-001 4.0000e-001 -6.0000e-001 -4.0000e-001 4.0000e-001 4 -5.0000e-001 5.0000e-001 5.6311e-017 5.0000e-001 -5.0000e-001 5 -3.0000e-001 3.0000e-001 8.0000e-001 -3.0000e-001 3.0000e-001 ---------------- NAG tests f01qdc Matrix B to be transformed BASIC_MATRIX [5 x 2], real: Row/Col 1 2 1 1.1000e+000 0.0000e+000 2 9.0000e-001 0.0000e+000 3 6.0000e-001 1.3200e+000 4 0.0000e+000 1.1000e+000 5 -8.0000e-001 -2.6000e-001 B = (Q transposed) * B BASIC_MATRIX [5 x 2], real: Row/Col 1 2 1 -1.0000e+000 -1.0000e+000 2 -1.0000e+000 1.0000e+000 3 -1.0000e+000 -1.0000e+000 4 -1.0000e-001 1.0000e-001 5 -1.0000e-001 -1.0000e-001 B = Q * B BASIC_MATRIX [5 x 2], real: Row/Col 1 2 1 -6.0000e-001 -4.2000e-001 2 -1.4000e+000 4.2000e-001 3 -7.6000e-001 -1.3360e+000 4 3.0000e-001 6.8000e-001 5 1.8000e-001 6.4800e-001 Testing feature 'solution' - made up data.. Assuming solution = A |x> BASIC_VECTOR |5>, real: Index # Values 1 4.5000e+000 4.5000e+000 4.4000e+000 2.5000e+000 -1.7000e+000 Now seeking |x> which minimizes |b> - A|x> Should be close to {1, 0, 1) BASIC_VECTOR |3>, real: Index # Values 1 1.0000e+000 1.4803e-016 1.0000e+000 height, width: 3 1