xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

網絡上的Matrix運算庫繁多,但有很多功能不夠完整,或缺少注釋,給使用者帶來不少麻煩。該函數庫是我搜集到的比較全面的矩陣運算庫,而且附帶引自清華大學bbs上的函數功能注釋,使用方便。 內容包括: Matrix.cpp 執行文件 Matrix.h 頭文件 【matrix頭文件聲明注釋】.txt 函數注釋說明文件 親測vs2010下可用 如果涉及到大型稀疏矩陣的運算可以參照我的另一個suitesparse資源

資源截圖

代碼片段和文件信息

//?Matrix.cpp:?implementation?of?the?CMatrix?class.
//
//////////////////////////////////////////////////////////////////////

//#include?“stdafx.h“
//#include?“ldi.h“

#include?
#include?“Matrix.h“
#include?
using?namespace?std;

#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////
//?基本構造函數
//////////////////////////////////////////////////////////////////////
CMatrix::CMatrix()
{
m_nNumColumns?=?1;
m_nNumRows?=?1;
m_pData?=?NULL;
BOOL?bSuccess?=?Init(m_nNumRows?m_nNumColumns);
ASSERT(bSuccess);
}

//////////////////////////////////////////////////////////////////////
//?指定行列構造函數
//
//?參數:
//?1.?int?nRows?-?指定的矩陣行數
//?2.?int?nCols?-?指定的矩陣列數
//////////////////////////////////////////////////////////////////////
CMatrix::CMatrix(int?nRows?int?nCols)
{
m_nNumRows?=?nRows;
m_nNumColumns?=?nCols;
m_pData?=?NULL;
BOOL?bSuccess?=?Init(m_nNumRows?m_nNumColumns);
ASSERT(bSuccess);
}

//////////////////////////////////////////////////////////////////////
//?指定值構造函數
//
//?參數:
//?1.?int?nRows?-?指定的矩陣行數
//?2.?int?nCols?-?指定的矩陣列數
//?3.?double?value[]?-?一維數組,長度為nRows*nCols,存儲矩陣各元素的值
//////////////////////////////////////////////////////////////////////
CMatrix::CMatrix(int?nRows?int?nCols?double?value[])
{
m_nNumRows?=?nRows;
m_nNumColumns?=?nCols;
m_pData?=?NULL;
BOOL?bSuccess?=?Init(m_nNumRows?m_nNumColumns);
ASSERT(bSuccess);

SetData(value);
}

//////////////////////////////////////////////////////////////////////
//?方陣構造函數
//
//?參數:
//?1.?int?nSize?-?方陣行列數
//////////////////////////////////////////////////////////////////////
CMatrix::CMatrix(int?nSize)
{
m_nNumRows?=?nSize;
m_nNumColumns?=?nSize;
m_pData?=?NULL;
BOOL?bSuccess?=?Init(nSize?nSize);
ASSERT?(bSuccess);
}

//////////////////////////////////////////////////////////////////////
//?方陣構造函數
//
//?參數:
//?1.?int?nSize?-?方陣行列數
//?2.?double?value[]?-?一維數組,長度為nRows*nRows,存儲方陣各元素的值
//////////////////////////////////////////////////////////////////////
CMatrix::CMatrix(int?nSize?double?value[])
{
m_nNumRows?=?nSize;
m_nNumColumns?=?nSize;
m_pData?=?NULL;
BOOL?bSuccess?=?Init(nSize?nSize);
ASSERT?(bSuccess);

SetData(value);
}

//////////////////////////////////////////////////////////////////////
//?拷貝構造函數
//
//?參數:
//?1.?const?CMatrix&?other?-?源矩陣
//////////////////////////////////////////////////////////////////////
CMatrix::CMatrix(const?CMatrix&?other)
{
m_nNumColumns?=?other.GetNumColumns();
m_nNumRows?=?other.GetNumRows();
m_pData?=?NULL;
BOOL?bSuccess?=?Init(m_nNumRows?m_nNumColumns);
ASSERT(bSuccess);

//?copy?the?pointer
memcpy(m_pData?ot

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????8664??2013-07-09?13:04??【matrix頭文件聲明注釋】.txt

?????文件??????75980??2013-04-28?14:05??Matrix.cpp

?????文件???????3231??2013-04-28?14:10??Matrix.h

-----------?---------??----------?-----??----

????????????????87875????????????????????3


評論

共有 條評論