📄 outer.cpp
字号:
/*****************************************************************************
* outer.cpp Blitz++ outer product (tensor notation) example
*
* $Id: outer.cpp,v 1.1 1997/07/16 19:38:23 tveldhui Exp $
*
* $Log: outer.cpp,v $
* Revision 1.1 1997/07/16 19:38:23 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*****************************************************************************
*/
#include <blitz/array.h>
#ifdef BZ_NAMESPACES
using namespace blitz;
#endif
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -