#include #include "mtl / utils.h" #include "mtl / mtl.h" #include "mtl / tinalg_vec.h"
/ * Sample Output;
X: [1, 2, 3, 4,] The L-1 Norm OF X IS 10 * /
Using namespace MTL;
INTMAIN () {Double X_ [5] = {1, 2, 3, 4, 5};
Double s = one_norm (array_to_vec (x_));
Std :: cout << "x:"; print_vector (array_to_vec (x_));
Std :: cout << "The L-1 Norm of X IS" << S << std :: endl;}
Output:
X: [1, 2, 3, 4] The L-1 Norm OF X IS 10