testing
This commit is contained in:
+25
-18
@@ -1,4 +1,4 @@
|
||||
#include "./utils/vector.h"
|
||||
#include "./utils/utils.h"
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@@ -8,26 +8,33 @@
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
|
||||
utils::Vd vect;
|
||||
vect.fill_RNG(3, 0, 42);
|
||||
vect.print();
|
||||
utils::Vd vect1, vect2;
|
||||
vect1.linspace(1, 3.14159, 11);
|
||||
vect1.print();
|
||||
//std::cout << vect[1] << std::endl;
|
||||
|
||||
utils::Md matr;
|
||||
/*matrix2.fill(2, 2, 0);
|
||||
matrix2.m[0].v[0] = 3;
|
||||
matrix2.m[0].v[1] = 3.5;
|
||||
/*
|
||||
utils::Md matr1, matr2, matr3;
|
||||
matr1.fill_RNG(3,3);
|
||||
matr2 = matr1.inverse("Gauss-Jordan");
|
||||
matr3 = matr1.matmult(matr2);
|
||||
//
|
||||
matr1.print();
|
||||
std::cout << "======" << std::endl;
|
||||
matr2.print();
|
||||
std::cout << "======" << std::endl;
|
||||
matr3.print();
|
||||
std::cout << "======" << std::endl;
|
||||
matr1.matmult(matr2).print();
|
||||
|
||||
matrix2.m[1].v[0] = 3.2;
|
||||
matrix2.m[1].v[1] = 3.6;
|
||||
|
||||
|
||||
std::cout << matrix2 << std::endl << std::endl;
|
||||
numeric::Md det;
|
||||
det = numeric::matrix_inverse(matrix2);
|
||||
std::cout << det << std::endl << std::endl;
|
||||
|
||||
*/
|
||||
std::cout << "---------" << std::endl;
|
||||
utils::Md matr4(2,3,2);
|
||||
vect2 = matr4.vecmult(vect1);
|
||||
matr4.inplace_transpose();
|
||||
matr4.transpose();
|
||||
|
||||
//result.print();
|
||||
*/
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user