// Solving Bu Robinkin
#include "mtrox.h" #include "mtl / dense1d.h" #include "mtl / mtl.h"
/ * Sample Output
A: 4X3 [[100, 100], [100, 100, 100], [100, 100, 100]] x: [1, 2, 3, 4,] Y: [1, 2, 3,] A XY ': 4X3 [[[ 101, 102, 103], [102, 104, 106], [103, 106, 109], [104, 108, 112] * /
INTMAIN () {Using Namespace MTL; // Begin Typedef Matrix
Typedef Matrix :: size_type size;
Const Sizet M = 4, N = 3; Matrix A (M, N); Dense1d Std :: cout << "A: << std :: endl; print_all_matrix (a); std :: cout <<" x: << std :: end1; print_vector (x); std :: cout << "Y:" << std :: endl; print_vector (y); // The a must be Rectangle and Dense // Begin Rank_one_Update (A, Scaled (X, Alpha), Y); // end std :: cout << "a xy ': << std :: endl PRINT_ALL_MATRIX (A); Return 0;}