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