init
This commit is contained in:
35
src/main.cxx
Normal file
35
src/main.cxx
Normal file
@@ -0,0 +1,35 @@
|
||||
#define EIGEN_USE_MKL_ALL
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
#include <complex>
|
||||
|
||||
|
||||
#include "Matrix.h"
|
||||
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
#include "spdlog/sinks/basic_file_sink.h"
|
||||
|
||||
int main() {
|
||||
double * dataA =new double[9];
|
||||
double * dataB =new double[9];
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
dataA[i]=(double)(i+1);
|
||||
dataB[i]=(double)(i+2);
|
||||
}
|
||||
Aurora::Matrix A = Aurora::Matrix::New(dataA,3,3);
|
||||
A.printf();
|
||||
Aurora::Matrix B = Aurora::Matrix::New(dataB,3,3);
|
||||
printf("B:\r\n");
|
||||
B.printf();
|
||||
printf("A*B:\r\n");
|
||||
(A*B).printf();
|
||||
printf("A*B+A:\r\n");
|
||||
(A*B+A).printf();
|
||||
A = (A*B+A)+3.;
|
||||
A.printf();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user