You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
377 B

#include "vector.hpp"
#include "matrix.hpp"
const vector vector::operator*(const matrix &m) const {
vector res(m.get_num_entries());
for (long long i = 0; i < this->get_dimention(); i++) {
cnumber sum = 0;
for (long long j = 0; j < this->get_dimention(); j++) {
sum = sum + (m.get_entry(j)[i] * this->entries[j]);
}
res[i] = sum;
}
return res;
}