From: Xu H. <g06...@nu...> - 2008-07-03 08:05:41
|
Hi everyone: I have a TinyMatrix<double,2,2> and want to multiply it with a double, but failed. Is there any way I can do it ? I know the TinyMatrix product() can multiply a TinyMartix with a vector or another TinyMatrix, but it can not workd with a double. Thanks. below is the code: #include "stdafx.h" #include<iostream> #include<blitz/array.h> using namespace std; using namespace blitz; int _tmain(int argc, _TCHAR* argv[]) { double s; TinyMatrix<double,2,2> ma,mb; ma=2.0; s=4.0; mb=ma*s; mb=product(ma,s); cout<<ma<<endl; cout<<mb<<endl; return 0; } Xu Haihua #08-22 E1 Civil Engineering NUS Singapore 119260 |