PIP 5.6.1
Platform-Independent Primitives
Классы | Макросы | Определения типов | Функции
Файл pimathmatrix.h

Математическая матрица Подробнее...

#include "pimathcomplex.h"
#include "pimathvector.h"

Классы

class  PIMathMatrixT< Rows, Cols, Type >
 Математическая матрица фиксированного размера. Хранит данные матрицы внутри объекта и по возможности проверяет размерности на этапе компиляции. Подробнее...
 
class  PIMathMatrix< Type >
 Математическая матрица динамического размера. Использует PIVector2D как хранилище и сохраняет интерфейс, согласованный с PIMathMatrixT. Подробнее...
 

Макросы

#define PIMM_FOR
 Matrix templated. Подробнее...
 
#define PIMM_FOR
 Matrix templated. Подробнее...
 

Определения типов

typedef PIMathMatrixT< 2u, 2u, int > PIMathMatrixT22i
 Матрица 2 x 2 фиксированного размера из int.
 
typedef PIMathMatrixT< 3u, 3u, int > PIMathMatrixT33i
 Матрица 3 x 3 фиксированного размера из int.
 
typedef PIMathMatrixT< 4u, 4u, int > PIMathMatrixT44i
 Матрица 4 x 4 фиксированного размера из int.
 
typedef PIMathMatrixT< 2u, 2u, double > PIMathMatrixT22d
 Матрица 2 x 2 фиксированного размера из double.
 
typedef PIMathMatrixT< 3u, 3u, double > PIMathMatrixT33d
 Матрица 3 x 3 фиксированного размера из double.
 
typedef PIMathMatrixT< 4u, 4u, double > PIMathMatrixT44d
 Матрица 4 x 4 фиксированного размера из double.
 
typedef PIMathMatrix< int > PIMathMatrixi
 Динамическая матрица из int.
 
typedef PIMathMatrix< double > PIMathMatrixd
 Динамическая матрица из double.
 

Функции

template<uint Rows, uint Cols, typename Type >
PICout operator<< (PICout s, const PIMathMatrixT< Rows, Cols, Type > &m)
 Inline-оператор для вывода матрицы в консоль. Подробнее...
 
template<uint CR, uint Rows0, uint Cols1, typename Type >
PIMathMatrixT< Rows0, Cols1, Type > operator* (const PIMathMatrixT< Rows0, CR, Type > &fm, const PIMathMatrixT< CR, Cols1, Type > &sm)
 Умножение матриц друг на друга. Подробнее...
 
template<uint Cols, uint Rows, typename Type >
PIMathVectorT< Rows, Type > operator* (const PIMathMatrixT< Rows, Cols, Type > &fm, const PIMathVectorT< Cols, Type > &sv)
 Умножения матрицы на вектор. Подробнее...
 
template<uint Cols, uint Rows, typename Type >
PIMathVectorT< Cols, Type > operator* (const PIMathVectorT< Rows, Type > &sv, const PIMathMatrixT< Rows, Cols, Type > &fm)
 Умножения вектора на матрицу. Подробнее...
 
template<uint Cols, uint Rows, typename Type >
PIMathMatrixT< Rows, Cols, Type > operator* (const Type &x, const PIMathMatrixT< Rows, Cols, Type > &v)
 Умножение значения тип Type на матрицу. Подробнее...
 
template<typename Type >
PICout operator<< (PICout s, const PIMathMatrix< Type > &m)
 Inline-оператор для вывода матрицы в консоль. Подробнее...
 
template<typename P , typename T >
PIBinaryStream< P > & operator<< (PIBinaryStream< P > &s, const PIMathMatrix< T > &v)
 Inline-оператор для сериализации матрицы в PIBinaryStream. Подробнее...
 
template<typename P , typename T >
PIBinaryStream< P > & operator>> (PIBinaryStream< P > &s, PIMathMatrix< T > &v)
 Inline-оператор для сериализации матрицы в PIByteArray. Подробнее...
 
template<typename Type >
PIMathMatrix< Type > operator* (const PIMathMatrix< Type > &fm, const PIMathMatrix< Type > &sm)
 Умножение матриц друг на друга. Подробнее...
 
template<typename Type >
PIMathVector< Type > operator* (const PIMathMatrix< Type > &fm, const PIMathVector< Type > &sv)
 Умножения матрицы на вектор. Подробнее...
 
template<typename Type >
PIMathVector< Type > operator* (const PIMathVector< Type > &sv, const PIMathMatrix< Type > &fm)
 Умножения вектора на матрицу. Подробнее...
 
template<typename Type >
PIMathMatrix< Type > operator* (const Type &x, const PIMathMatrix< Type > &v)
 Умножение значения тип Type на матрицу. Подробнее...
 
template<typename T >
PIMathMatrix< complex< T > > hermitian (const PIMathMatrix< complex< T > > &m)
 Возвращает эрмитову форму комплексной матрицы m.
 

Подробное описание

Математическая матрица

Макросы

◆ PIMM_FOR [1/2]

#define PIMM_FOR
Макроопределение:
for (uint r = 0; r < Rows; ++r) \
for (uint c = 0; c < Cols; ++c)

Matrix templated.

Matrix.

◆ PIMM_FOR [2/2]

#define PIMM_FOR
Макроопределение:
for (uint r = 0; r < _V2D::rows_; ++r) \
for (uint c = 0; c < _V2D::cols_; ++c)

Matrix templated.

Matrix.

Функции

◆ operator<<() [1/3]

template<uint Rows, uint Cols, typename Type >
PICout operator<< ( PICout  s,
const PIMathMatrixT< Rows, Cols, Type > &  m 
)
inline

Inline-оператор для вывода матрицы в консоль.

Аргументы
sтипа PICout.
mтипа PIMathMatrixT.
Возвращает
непечатанная в консоль PICout.

◆ operator*() [1/8]

template<uint CR, uint Rows0, uint Cols1, typename Type >
PIMathMatrixT< Rows0, Cols1, Type > operator* ( const PIMathMatrixT< Rows0, CR, Type > &  fm,
const PIMathMatrixT< CR, Cols1, Type > &  sm 
)
inline

Умножение матриц друг на друга.

Аргументы
fmпервый множитель-матрица.
smвторой множитель-матрица.
Возвращает
матрица, являющаяся результатом умножения.

◆ operator*() [2/8]

template<uint Cols, uint Rows, typename Type >
PIMathVectorT< Rows, Type > operator* ( const PIMathMatrixT< Rows, Cols, Type > &  fm,
const PIMathVectorT< Cols, Type > &  sv 
)
inline

Умножения матрицы на вектор.

Аргументы
fmпервый множитель-матрица.
svвторой множитель-вектор.
Возвращает
вектор, являющийся результатом умножения.

◆ operator*() [3/8]

template<uint Cols, uint Rows, typename Type >
PIMathVectorT< Cols, Type > operator* ( const PIMathVectorT< Rows, Type > &  sv,
const PIMathMatrixT< Rows, Cols, Type > &  fm 
)
inline

Умножения вектора на матрицу.

Аргументы
svвторой множитель-вектор.
fmпервый множитель-матрица.
Возвращает
вектор, являющийся результатом умножения.

◆ operator*() [4/8]

template<uint Cols, uint Rows, typename Type >
PIMathMatrixT< Rows, Cols, Type > operator* ( const Type &  x,
const PIMathMatrixT< Rows, Cols, Type > &  v 
)
inline

Умножение значения тип Type на матрицу.

Аргументы
xпервый множитель типа Type.
vвторая множитель-матрица.
Возвращает
матрица, являющаяся результатом умножения.

◆ operator<<() [2/3]

template<typename Type >
PICout operator<< ( PICout  s,
const PIMathMatrix< Type > &  m 
)
inline

Inline-оператор для вывода матрицы в консоль.

Аргументы
sтипа PICout.
mтипа PIMathMatrixT.
Возвращает
непечатанная в консоль PICout.

◆ operator<<() [3/3]

template<typename P , typename T >
PIBinaryStream< P > & operator<< ( PIBinaryStream< P > &  s,
const PIMathMatrix< T > &  v 
)
inline

Inline-оператор для сериализации матрицы в PIBinaryStream.

Аргументы
sтипа PIBinaryStream.
vтипа PIMathMatrix.

◆ operator>>()

template<typename P , typename T >
PIBinaryStream< P > & operator>> ( PIBinaryStream< P > &  s,
PIMathMatrix< T > &  v 
)
inline

Inline-оператор для сериализации матрицы в PIByteArray.

Аргументы
sтипа PIBinaryStream.
vтипа PIMathMatrix.

◆ operator*() [5/8]

template<typename Type >
PIMathMatrix< Type > operator* ( const PIMathMatrix< Type > &  fm,
const PIMathMatrix< Type > &  sm 
)
inline

Умножение матриц друг на друга.

Если вы введете индекс вне границ матрицы, то поведение не определено ("undefined behavior").

Аргументы
fmпервый множитель-матрица.
smвторая множитель-матрица.
Возвращает
матрица, являющаяся результатом умножения.

◆ operator*() [6/8]

template<typename Type >
PIMathVector< Type > operator* ( const PIMathMatrix< Type > &  fm,
const PIMathVector< Type > &  sv 
)
inline

Умножения матрицы на вектор.

Если вы введете индекс вне границ матрицы, то поведение не определено ("undefined behavior").

Аргументы
fmпервый множитель-матрица.
svвторой множитель-вектор.
Возвращает
вектор, являющийся результатом умножения.

◆ operator*() [7/8]

template<typename Type >
PIMathVector< Type > operator* ( const PIMathVector< Type > &  sv,
const PIMathMatrix< Type > &  fm 
)
inline

Умножения вектора на матрицу.

Если вы введете индекс вне границ матрицы, то поведение не определено ("undefined behavior").

Аргументы
svвторой множитель-вектор.
fmпервый множитель-матрица.
Возвращает
вектор, являющийся результатом умножения.

◆ operator*() [8/8]

template<typename Type >
PIMathMatrix< Type > operator* ( const Type &  x,
const PIMathMatrix< Type > &  v 
)
inline

Умножение значения тип Type на матрицу.

Аргументы
xпервый множитель типа Type.
vвторой множитель-матрица.
Возвращает
матрица, являющаяся результатом умножения.