/* ███████╗██████╗ ██████╗ ███████╗ ███████╗███╗ ██╗ ██████╗ ██╗███╗ ██╗███████╗ ██╔════╝██╔══██╗██╔════╝ ██╔════╝ ██╔════╝████╗ ██║██╔════╝ ██║████╗ ██║██╔════╝ █████╗ ██║ ██║██║ ███╗█████╗ █████╗ ██╔██╗ ██║██║ ███╗██║██╔██╗ ██║█████╗ ██╔══╝ ██║ ██║██║ ██║██╔══╝ ██╔══╝ ██║╚██╗██║██║ ██║██║██║╚██╗██║██╔══╝ ███████╗██████╔╝╚██████╔╝███████╗ ███████╗██║ ╚████║╚██████╔╝██║██║ ╚████║███████╗ ╚══════╝╚═════╝ ╚═════╝ ╚══════╝ ╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝╚══════╝ Author:Edge Web:likedge.top Date:20200925 matrix add flag stand use binary or not default 1 move_ele change the x,y to y,x get_T :get the matrix transpose input:Matrix a; output:Matrix a.transpose and -- just test --------------------------------------------------------------- if you have the better answer on it , it is nothing, just test~ --------------------------------------------------------------- */ #ifndef MATRIX_PRO #define MATRIX_PRO #include #include #include #define random(x) (rand()%x) void move_ele(int &ele1, int &ele2) { ele1 ^= ele2 ^= ele1 ^= ele2; } int add_by(int a,int b) { int ans; while(b) { ans = a^b; b = ((a&b)<<1); a = ans; } return a; } //two matrix add Matrix add(Matrix mid1,Matrix mid2,int flag=1) { if(mid1.row == mid2.row&&mid1.col == mid2.col) { for(int x = 0;x0) {return val_relu;} else {return 0;} } Matrix mat_relu(Matrix mid1) { Matrix relu_mat = CreateMatrix(mid1.row,mid1.col); for(int index_x = 0;index_x