outer.cpp
来自「A C++ class library for scientific compu」· C++ 代码 · 共 28 行
CPP
28 行
/***************************************************************************** * outer.cpp Blitz++ outer product (tensor notation) example * $Id: outer.cpp,v 1.5 2004/10/07 01:23:26 julianc Exp $ *****************************************************************************/#include <blitz/array.h>BZ_USING_NAMESPACE(blitz)int main(){ Array<float,1> x(4), y(4); Array<float,2> A(4,4); x = 1, 2, 3, 4; y = 1, 0, 0, 1; firstIndex i; secondIndex j; A = x(i) * y(j); cout << A << endl; return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?