📄 example.cc
字号:
// file: $isip/doc/examples/class/numeric/numeric_example_00/example.cc// version: $Id: example.cc,v 1.1 2001/04/27 02:30:01 srivasta Exp $//// isip include files//#include <LinearAlgebra.h>#include <Console.h>// main program starts here//int main (int argc, const char **argv) { // declare a multiplier matrix (2x2) // MatrixFloat A_fl(2, 2, L" 2, 4, 7, 5"); MatrixDouble A_doub(2, 2, L" 2, 4, 7, 5"); // declare the vector of knowns (2x1) // VectorFloat b_fl(L"16, 29"); VectorDouble b_doub(L"16, 29"); // test vectors // VectorFloat x_fl; VectorDouble x_doub; // test linearSolve // LinearAlgebra::linearSolve(x_fl, A_fl, b_fl); LinearAlgebra::linearSolve(x_doub, A_doub, b_doub); // print the output // x_fl.debug(L"Result vector for float type"); x_doub.debug(L"Result vector for double type"); // exit gracefully // Integral::exit();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -