亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? coearray.cpp

?? 氣體熱力性質計算程序
?? CPP
字號:
#pragma once

#include "coeArray.h"

/*===============================================================================
the constructional function of class "coeArray"
Parameters:
	len (unsigned int): indicating the number of sub-arrays in the 2-d array
Action:
	allocate the memory for the 1st dimension of the 2-d array if len is not 0,
initiate the sub pointer to NULL. allocate memory for the temperature limit 
array and the length of sub array and initiate them to 0.
	if len is 0, initiate all the pointers to NULL.
-------------------------------------------------------------------------------*/
coeArray::coeArray(unsigned int len):
_len(len)
{
	if(_len!=0)
	{
		_sublen=new unsigned int[_len];
		_Tl=new double[_len+1];
		A=new double *[_len];		
		for(unsigned int i=0; i<_len; ++i)
		{
			_sublen[i]=0;
			A[i]=NULL;
			_Tl[i]=0.0;
		}
		_Tl[_len]=0.0;
	}
	else
	{
		A=NULL;
		_sublen=NULL;
		_Tl=NULL;
	}
}

/*===============================================================================
the copy constructional function of class "coeArray"
Parameters:
	des (coeArray &): the original object to copy
Action:
	if the length of array in "des" is not 0, copy all the arrays in des to this.
	if the length of array in "des" is 0, set all the pointers in this to NULL.
-------------------------------------------------------------------------------*/
coeArray::coeArray(const coeArray &des)
{
	if(des._len!=0)
	{
		//copy the new data 
		CopyArray(des);
	}
	else
	{
		_len=0;
		A=NULL;
		_sublen=NULL;
		_Tl=NULL;
	}
}

/*===============================================================================
the destructional function of class "coeArray"
Parameters: None
Action:
	free all the memory for pointers in coeArray if them have been allocated new
memory.
-------------------------------------------------------------------------------*/
coeArray::~coeArray()
{
	if(_len!=0)
	{
		//free the allocated memory
		for(unsigned int i=0; i<_len; ++i)
		{
			if(_sublen[i]!=0)
				delete []A[i];
		}		
		delete []_sublen;
		delete []A;
		delete []_Tl;
	}
}

/*===============================================================================
the overload of operator [] in coeArray
Parameters: 
	index(unsigned int): the index used in returning 
Action:
	return the address of sub-arrays in the class, indexed by the parameter "index"
-------------------------------------------------------------------------------*/
inline double *coeArray::operator[](unsigned int index)
{
	if(index<_len)
		return A[index];
	else
		return NULL;
}
/*===============================================================================
Name: operator=
	the overload of operator = in coeArray
Parameters: 
	des(const coeArray &): the obj
Return:
	coeArray &: the refence to this
Action:
	copy the data in "des". Before copying, this function will check the memory and 
the already allocated
-------------------------------------------------------------------------------*/
inline coeArray &coeArray::operator =(const coeArray &des)
{
	if(this==&des)
		return *this;
	else
	{
		//free the allocated memory
		if(_len!=0)
		{
			for(unsigned int i=0; i<_len; ++i)
			{
				if(_sublen[i]!=0)
					delete []A[i];
			}
			delete []A;
			delete []_sublen;
			delete []_Tl;
			_len=0;
			A=NULL;
			_sublen=NULL;
		}
		//copy the new data 
		if(des._len!=0)
		{
			CopyArray(des);
		}
		return *this;
	}
}

/*==================================================================================
Name: CopyArray
Paremeter:
	des(const coeArray &): the object to copy data from
Return:
	void
Action:
	allocate new memory for this and copy the data in des
----------------------------------------------------------------------------------*/
inline void coeArray::CopyArray(const coeArray &des)
{
	_len=des._len;
	A=new double *[_len];
	_sublen=new unsigned int [_len];
	_Tl=new double[_len+1];
	for(unsigned int i=0; i<_len; ++i)
	{
		_sublen[i]=des._sublen[i];
		A[i]=new double[_sublen[i]];
		if(_sublen[i]!=0)
		{
			for(unsigned int j=0; j<_sublen[i]; ++j)	
				A[i][j]=des.A[i][j];					
		}
		_Tl[i]=des._Tl[i];
	}
}

/*=======================================================================================
Name: SubAlloc
	allocate memory for sub arrays
Parameters:
	index(unsigned int): the index of the sub array
	sublen(unsigned int): the length of memory to allocate for the sub array
Return:
	bool
Action:
	if index is larger than the length of the array, the allocation is failed, and the
function will return false.
	if index is smaller than the length of the array, the function will allocate some 
new function for the sub array and return true.
---------------------------------------------------------------------------------------*/
inline bool coeArray::SubAlloc(unsigned int index,unsigned int sublen)
{
	if(index<_len)
	{
		if(_sublen[index]!=0)
			delete []A[index];
		A[index]=new double[sublen];
		_sublen[index]=sublen;
		return true;
	}
	else
		return false;
}

/*===============================================================================
Name: Len
	the member function in coeArray
Parameters: 
	None
Return:
	unsigned int: the length of the array
Action:
	return the length of array in the class
-------------------------------------------------------------------------------*/
inline unsigned int coeArray::Len()
{
	return _len;
}

/*===============================================================================
Name: Sublen
	the member function in coeArray
Parameters: 
	index(unsigned int): the index used in returning 
Return:
	unsigned int: the length of the indicated sub-array
Action:
	return the length of sub-arrays in the class, indexed by the parameter "index".
If the "index" is larger the the length of the array, the function returns a zero.
-------------------------------------------------------------------------------*/
inline unsigned int coeArray::SubLen(unsigned int index)
{
	if(index<_len)
		return _sublen[index];
	else
		return 0;
}

/*===============================================================================
Name: Tl
	the member function in coeArray
Parameters: 
	index(unsigned int): the index used in returning 
Return:
	double &: the temperature limit for each segment
Action:
	return the refernce of temperature limit for each segment precising the Cp, 
indexed by the parameter "index". If index is larger than the _len, the function
will return the referance to the redundant element in _Tl.
-------------------------------------------------------------------------------*/
inline double &coeArray::Tl(unsigned int index)
{
	if(index<_len)
		return _Tl[index];
	else
		return _Tl[_len];
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线不卡中文字幕播放| 亚洲激情欧美激情| 中文字幕亚洲视频| 三级成人在线视频| a亚洲天堂av| 欧美一区二区三区喷汁尤物| 中文一区二区完整视频在线观看| 亚洲国产日韩a在线播放| 国产成人自拍网| 在线播放一区二区三区| 国产精品的网站| 精品一区二区三区欧美| 欧美日韩在线电影| 国产精品福利av| 国产精品一品二品| 91精品国产综合久久精品| 亚洲欧美成人一区二区三区| 国产成人高清在线| 日韩午夜av一区| 亚洲超碰精品一区二区| 不卡视频一二三| 久久久久久久久97黄色工厂| 青草av.久久免费一区| 91久久精品日日躁夜夜躁欧美| 国产喂奶挤奶一区二区三区| 全部av―极品视觉盛宴亚洲| 欧美午夜精品一区二区三区 | 99精品久久99久久久久| 精品国产乱码久久久久久1区2区| 丝袜脚交一区二区| 一本色道亚洲精品aⅴ| 国产女人18水真多18精品一级做| 精品一区免费av| 精品久久一区二区| 激情小说亚洲一区| 精品国免费一区二区三区| 日本午夜一区二区| 欧美最猛黑人xxxxx猛交| 亚洲人午夜精品天堂一二香蕉| 国产成人免费在线视频| 久久精品亚洲国产奇米99 | 一区二区三区在线不卡| 一本色道久久综合亚洲精品按摩| 亚洲日本韩国一区| 色老汉一区二区三区| 亚洲一级在线观看| 欧美另类videos死尸| 天涯成人国产亚洲精品一区av| 欧美裸体bbwbbwbbw| 天天综合色天天综合| 日韩三级视频中文字幕| 国产在线精品视频| 欧美国产日本视频| 91亚洲永久精品| 夜夜操天天操亚洲| 日韩一级高清毛片| 国产精品亚洲视频| 亚洲激情第一区| 91麻豆精品国产自产在线观看一区 | 亚洲欧美日韩小说| 欧美日韩成人综合| 国产一区二区主播在线| 国产精品入口麻豆原神| 在线观看网站黄不卡| 免费人成精品欧美精品 | 国产亚洲综合在线| 一本到不卡免费一区二区| 午夜成人免费视频| 欧美成人性福生活免费看| 成人福利视频在线| 午夜精品一区二区三区电影天堂| 精品国精品国产尤物美女| 99视频有精品| 蜜桃久久av一区| 亚洲男同性视频| 欧美成人精精品一区二区频| 不卡视频一二三| 久久成人免费网| 亚洲裸体在线观看| 精品日韩成人av| 色狠狠av一区二区三区| 韩国视频一区二区| 亚洲国产精品视频| 日本一区二区三区国色天香| 欧美丰满嫩嫩电影| 99vv1com这只有精品| 黑人巨大精品欧美一区| 亚洲午夜一区二区三区| 国产欧美一区在线| 精品国产一区二区三区久久影院| 成人国产电影网| 激情综合色丁香一区二区| 亚洲一区二区三区影院| 国产精品欧美久久久久无广告| 欧美一区二区私人影院日本| 色欧美88888久久久久久影院| 九色porny丨国产精品| 亚洲高清免费一级二级三级| 欧美极品xxx| 26uuu色噜噜精品一区二区| 精品视频999| 欧洲精品中文字幕| 成人动漫av在线| 国产乱淫av一区二区三区| 五月激情六月综合| 亚洲高清免费观看| 一区二区在线观看av| 国产精品人人做人人爽人人添| 日韩精品专区在线影院重磅| 欧美人与禽zozo性伦| 日本道精品一区二区三区| av一区二区不卡| 成人avav影音| 成人av在线资源| 丁香激情综合国产| 国产成人精品一区二| 国产麻豆精品theporn| 久久66热re国产| 国产真实乱子伦精品视频| 激情综合色综合久久综合| 免费人成网站在线观看欧美高清| 日精品一区二区三区| 亚洲综合男人的天堂| 亚洲一二三四在线观看| 亚洲精品午夜久久久| 91麻豆国产精品久久| 91精品欧美久久久久久动漫| 99re热视频精品| 99精品热视频| 在线观看三级视频欧美| 在线免费一区三区| 欧美精品一级二级| 丝袜亚洲另类丝袜在线| 日韩精品一区二区三区三区免费| 91丝袜美女网| 成人性视频免费网站| 久久精品久久久精品美女| 亚洲狠狠爱一区二区三区| 国产亚洲一本大道中文在线| 欧美一级黄色片| 欧美三级日韩三级国产三级| a级精品国产片在线观看| 国内精品写真在线观看| 日韩制服丝袜av| 亚洲自拍另类综合| 日韩一区在线看| 中文天堂在线一区| 亚洲精品在线观看视频| 99riav一区二区三区| 国产成人av一区二区三区在线| 日本不卡一二三| 天堂蜜桃一区二区三区| 亚洲图片欧美一区| 亚洲综合在线电影| 国产精品久久久久精k8| 国产精品乱码人人做人人爱 | 亚洲一级二级三级| 亚洲主播在线播放| 亚洲天堂成人网| 一区二区三区波多野结衣在线观看| 国产精品网站一区| 中文字幕永久在线不卡| 国产精品久久久一区麻豆最新章节| 国产午夜一区二区三区| 国产三级欧美三级日产三级99| 久久精品一区八戒影视| 国产欧美日韩在线看| 中文在线一区二区| 亚洲色图欧美激情| 一区二区三区在线免费视频| 亚洲综合久久久久| 午夜久久久久久电影| 卡一卡二国产精品 | 中文子幕无线码一区tr| 国产精品理论在线观看| 亚洲欧美日韩久久| 亚洲777理论| 激情深爱一区二区| 成人av资源下载| 欧美日韩亚洲丝袜制服| 欧美变态tickling挠脚心| 国产婷婷精品av在线| 成人免费在线视频| 日韩中文字幕一区二区三区| 国产精品一区在线观看你懂的| av成人老司机| 欧美色综合久久| 精品免费国产一区二区三区四区| 国产婷婷色一区二区三区四区 | 国产精品久久久久aaaa樱花| 一区二区欧美精品| 激情欧美日韩一区二区| 91蜜桃婷婷狠狠久久综合9色| 欧美三级日本三级少妇99| 欧美va亚洲va| 亚洲三级在线免费| 久久99精品久久久| 日本韩国欧美一区二区三区| 精品免费国产二区三区| 亚洲一区二区在线免费观看视频|