Exemplo n.º 1
0
	void operator/(const MyMatrix &b){	// transpose
		for(int i = 0; i < _dim; i++){
			for(int j = 0; j < _dim; j++){
				vecvec[i][j] = b.get(j,i);
			}
		}
	}
Exemplo n.º 2
0
	void operator-=(const MyMatrix &b){
		for(int i = 0; i < _dim; i++){
			for(int j = 0; j < _dim; j++){
				int tmp= (int) (vecvec[i][j]- b.get(i, j));
				vecvec[i][j]=tmp;
			}
		}
	}
Exemplo n.º 3
0
	void operator*=(const MyMatrix &b){
		for(int i = 0; i < _dim; i++){
			std::vector<float> temporalVectorA((unsigned long) _dim,0);
			for (int h = 0; h < _dim; h++){
				temporalVectorA[h] = vecvec[i][h];
			}
			for(int k = 0; k < _dim; k++){
				std::vector<float> temporalVectorB((unsigned long) _dim,0);
				for(int l = 0; l < _dim; l++){
					temporalVectorB[l] = b.get(l, k);
				}
				vecvec[i][k] = vectorMultiply(temporalVectorA, temporalVectorB);
			}
		}
	}