1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-06-22 08:52:01 +01:00

big project cleaning

This commit is contained in:
2014-03-12 19:54:27 +00:00
parent 052f6cb389
commit 28b3306110
16 changed files with 29 additions and 1095 deletions

View File

@ -9,19 +9,21 @@ using namespace Latan;
int main(void)
{
AsciiFile F;
DMat A,B;
DMat A(2, 3), B(3, 2);
const string fileName = "exMat.dat";
A << 1, 2, 3,
4, 5, 6;
B << 1.0, 2.5,
4.5, 8.9,
1.2, 3.5;
// read
cout << "-- reading " << fileName << "..." << endl;
F.open(fileName, File::Mode::read);
A = F.read<DMat>("A");
B = F.read<DMat>("B");
cout << "A=\n" << A << '\n' << endl;
cout << "B=\n" << B << '\n' << endl;
cout << "A*B=\n" << A*B << '\n' << endl;
cout << "cos(A)=\n" << A.unaryExpr(StdMath::cos) << '\n' << endl;
F.close();
cout << "A=\n" << A << '\n' << endl;
cout << "B=\n" << B << '\n' << endl;
cout << "A*B=\n" << A*B << '\n' << endl;
cout << "cos(A)=\n" << A.unaryExpr(StdMath::cos) << '\n' << endl;
// write
cout << "-- saving A*B..." << endl;