是可用的Blitz++矩阵文档?
我在谷歌上找到了http://www.oonumerics.org/blitz//manual/blitz01.html,但这似乎不包含文档。
我找到的唯一有用的例子是来自罗塞塔科德的这个例子
#include <iostream>
#include <blitz/tinymat.h>
int main()
{
using namespace blitz;
TinyMatrix<double,3,3> A, B, C;
A = 1, 2, 3,
4, 5, 6,
7, 8, 9;
B = 1, 0, 0,
0, 1, 0,
0, 0, 1;
C = product(A, B);
std::cout << C << std::endl;
}但这个小例子并没有回答我的许多问题:
搜索tinymat.h显示了这个文件夹:
moose@pc07:/usr/include/blitz$ ls
applics.h matbops.h ops.h tinyvec-et.h vecglobs.h
array matdiag.h prettyprint.h tinyvec.h vecio.cc
array.h matexpr.h promote.h tinyvecio.cc veciter.h
array-impl.h matgen.h promote-old.h tinyveciter.h vecmax.cc
array-old.h mathf2.h rand-dunif.h traversal.cc vecmin.cc
bench.cc mathfunc.h rand-mt.h traversal.h vecnorm1.cc
benchext.cc matltri.h rand-normal.h tuning.h vecnorm.cc
benchext.h matref.h random.h tvcross.h vecpick.cc
bench.h matrix.cc randref.h tvecglobs.h vecpick.h
blitz.h matrix.h rand-tt800.h update.h vecpickio.cc
bzconfig.h matsymm.h rand-uniform.h vecaccum.cc vecpickiter.h
bzdebug.h mattoep.h range.h vecall.cc vecsum.cc
compiler.h matuops.h reduce.h vecany.cc vector.cc
config.h matutri.h shapecheck.h vecbfn.cc vector-et.h
etbase.h memblock.cc tau.h vecbops.cc vector.h
extremum.h memblock.h timer.h veccount.cc vecuops.cc
funcs.h meta tiny.h vecdelta.cc vecwhere.cc
gnu minmax.h tinymatexpr.h vecdot.cc vecwhere.h
indexexpr.h mstruct.h tinymat.h vecexpr.h wrap-climits.h
limits-hack.h numinquire.h tinymatio.cc vecexprwrap.h zero.cc
listinit.h numtrait.h tinyvec.cc vecglobs.cc zero.h所以我想Matrix是大矩阵的。但我怎么把它们相乘呢?此外,这不是我喜欢的学习图书馆的方法。
我安装了libblitz-doc - C++ template class library for scientific computing,所以文档应该在我的计算机上。但我要去哪找呢?
发布于 2012-06-20 19:53:58
www.oonumerics.org的网站现在似乎被破坏了。但是,Blitz的完整文档包含在包中,可以从此链接在SourceForge上下载。
在闪电战中,没有像BigMatrix这样的特殊类。矩阵只是一个二维数组,所以使用Array模板.您不必在编译时知道数组/矩阵的大小。下面是文档中的一个小示例:
#include <blitz/array.h>
using namespace blitz;
int main()
{
Array<int,2> A(6,6), B(3,3);
// Set the upper left quadrant of A to 5
A(Range(0,2), Range(0,2)) = 5;
// Set the upper right quadrant of A to an identity matrix
B = 1, 0, 0,
0, 1, 0,
0, 0, 1;
A(Range(0,2), Range(3,5)) = B;
// Set the fourth row to 1
A(3, Range::all()) = 1;
// Set the last two rows to 0
A(Range(4, Range::toEnd), Range::all()) = 0;
// Set the bottom right element to 8
A(5,5) = 8;
cout << "A = " << A << endl;
return 0;
}如果您使用基于Debian的发行版,dpkg -L libblitz-doc将显示libblitz-doc包的内容,您可以看到文档的位置。在我的机器上他们在/usr/share/doc/libblitz-doc/
https://stackoverflow.com/questions/11113993
复制相似问题