git-svn-id: svn://db.shs.com.ru/pip@202 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2016-05-25 13:50:43 +00:00
parent 92f49293dc
commit 8512f6c66f

View File

@@ -248,8 +248,8 @@ inline PIMathMatrixT<Rows0, Cols1, Type> operator *(const PIMathMatrixT<Rows0, C
/// Multiply matrix {Rows x Cols} on vector {Cols}, result is vector {Rows}
template<uint Cols, uint Rows, typename Type>
inline PIMathVectorT<Cols, Type> operator *(const PIMathMatrixT<Rows, Cols, Type> & fm,
const PIMathVectorT<Rows, Type> & sv) {
inline PIMathVectorT<Rows, Type> operator *(const PIMathMatrixT<Rows, Cols, Type> & fm,
const PIMathVectorT<Cols, Type> & sv) {
PIMathVectorT<Rows, Type> tv;
Type t;
for (uint j = 0; j < Rows; ++j) {
@@ -261,21 +261,20 @@ inline PIMathVectorT<Cols, Type> operator *(const PIMathMatrixT<Rows, Cols, Type
return tv;
}
/*
/// Multiply vector {Cols}T on matrix {Rows x Cols}, result is vector {Rows}T
/// Multiply vector {Rows} on matrix {Rows x Cols}, result is vector {Cols}
template<uint Cols, uint Rows, typename Type>
inline PIMathVectorT<Cols, Type> operator *(const PIMathMatrixT<Rows, Cols, Type> & fm,
const PIMathVectorT<Rows, Type> & sv) {
PIMathVectorT<Rows, Type> tv;
inline PIMathVectorT<Cols, Type> operator *(const PIMathVectorT<Rows, Type> & sv,
const PIMathMatrixT<Rows, Cols, Type> & fm) {
PIMathVectorT<Cols, Type> tv;
Type t;
for (uint j = 0; j < Rows; ++j) {
for (uint j = 0; j < Cols; ++j) {
t = Type(0);
for (uint i = 0; i < Cols; ++i)
t += fm[j][i] * sv[i];
for (uint i = 0; i < Rows; ++i)
t += fm[i][j] * sv[i];
tv[j] = t;
}
return tv;
}*/
}
/// Multiply value(T) on matrix {Rows x Cols}, result is vector {Rows}
template<uint Cols, uint Rows, typename Type>