# 请讨论矩阵类

swnuwangyun 2002-12-28 03:19:32

...全文
9 点赞 收藏 17

17 条回复

bathing 2003-01-20

xuejm 2003-01-20

blas 2003-01-14

The C++ Programming Language--numeric

http://www.netlib.org/可以下载。

TMMatrix<int> v1, v2;
v1[_r(2, 30)][_r(1, 20)] = v2[_r()][_r()];

blas 2003-01-08

majiangping 2003-01-05
MTL是什么?

suncfboy 2003-01-05

chaisave 2003-01-04

liu_feng_fly 2003-01-03

lak47 2003-01-03

void identity();
template<typename T1,int R1,int C1>
Matrix(const Matrix<T1,R1,C1>& );

template<typename T1,int R1,int C1>
Matrix& opreator(const Matrix<T1,R1,C1>& );

Matrix* invert();//转置

lak47 2003-01-03
inner类_Row中这样定义
class _Row
{
public:
template<typename _T1>
_Row operator +(_T1 _x)const;
_Row operator +(const _Row& _x)const;
template<typename _T1>
_Row& operator +=(_T1 _x);
_Row& operator +=(const _Row& _x);

template<typename _T1>
_Row operator -(_T1 _x)const;
_Row operator -(const _Row& _x)const;
template<typename _T1>
_Row& operator -=(_T1 _x);
_Row& operator -=(const _Row& _x);

template<typename _T1>
_Row operator *(_T1 _x)const;
template<typename _T1>
_Row& operator *=(_T1 _x);

template<typename _T1>
_Row operator /(_T1 _x)const;
template<typename _T1>
_Row& operator /=(_T1 _x);

_T& operator [](int n);
const _T operator[](int n)const;
private:
_T _data[_C];
};

lak47 2003-01-03

template<typename _T,int _R,int _C>
class Matrix
{
public:
class _Row{
};

const _Row& operator[](int n)const;
_Row& operator[](int n);
private:
_Row _data[_R];
}

kangde 2002-12-30

shornmao 2002-12-30
std::valarray，去看吧。

lak47 2002-12-29

serverclient 2002-12-29

Reve 2002-12-29

2.4w+

C/C++ 工具平台和程序库

2002-12-28 03:19