mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
improved naming
This commit is contained in:
@@ -377,12 +377,12 @@ namespace omath
|
||||
cache_friendly_multiply_row_major(const Mat<Columns, OtherColumns, Type, MatStoreType::ROW_MAJOR>& other) const
|
||||
{
|
||||
Mat<Rows, OtherColumns, Type, MatStoreType::ROW_MAJOR> result;
|
||||
for (std::size_t i = 0; i < Rows; ++i)
|
||||
for (std::size_t k = 0; k < Columns; ++k)
|
||||
for (std::size_t row_index = 0; row_index < Rows; ++row_index)
|
||||
for (std::size_t column_index = 0; column_index < Columns; ++column_index)
|
||||
{
|
||||
const Type aik = at(i, k);
|
||||
for (std::size_t j = 0; j < OtherColumns; ++j)
|
||||
result.at(i, j) += aik * other.at(k, j);
|
||||
const Type current_number = at(row_index, column_index);
|
||||
for (std::size_t other_column = 0; other_column < OtherColumns; ++other_column)
|
||||
result.at(row_index, other_column) += current_number * other.at(column_index, other_column);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -392,12 +392,12 @@ namespace omath
|
||||
const Mat<Columns, OtherColumns, Type, MatStoreType::COLUMN_MAJOR>& other) const
|
||||
{
|
||||
Mat<Rows, OtherColumns, Type, MatStoreType::COLUMN_MAJOR> result;
|
||||
for (std::size_t j = 0; j < OtherColumns; ++j)
|
||||
for (std::size_t k = 0; k < Columns; ++k)
|
||||
for (std::size_t other_column = 0; other_column < OtherColumns; ++other_column)
|
||||
for (std::size_t column_index = 0; column_index < Columns; ++column_index)
|
||||
{
|
||||
const Type bkj = other.at(k, j);
|
||||
for (std::size_t i = 0; i < Rows; ++i)
|
||||
result.at(i, j) += at(i, k) * bkj;
|
||||
const Type current_number = other.at(column_index, other_column);
|
||||
for (std::size_t row_index = 0; row_index < Rows; ++row_index)
|
||||
result.at(row_index, other_column) += at(row_index, column_index) * current_number;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user