📄 abs_sum.cc
字号:
#include <iostream>#include "mtl/utils.h"#include "mtl/mtl.h"#include "mtl/linalg_vec.h"/* Sample output;X: [1,2,3,4,]The L-1 norm of X is 10 */using namespace mtl;intmain(){ double x_[4] = { 1, 2, 3, 4 }; 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;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -