Introduction
最新推荐文章于 2024-12-12 19:04:10 发布

花花橙子 于 2022-10-13 17:46:15 发布
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
ADT示例
向量vector容器
template<class ELEM>
class vector
{
private:
ELEM *v[];
int maxLength;
int currenSize;
public:
vector<ELEM> v;
vector<ELEM> v(K);
vector<ELEM> v(k,value);
int size();
}
二维矩阵容器matrix
template<class ELEM>
class matrix
{
typedef vector<ELEM> Mrow;
typedef vector<ELEM> Mmatrix;
private:
Mmatrix amatrix;
int maxLength;
public:
Mmatrix<ELEM> m;
Mmatrix<ELEM> m(k);
Mmatrix<ELEM> m(k,value);
int v.size();
}
算法
算法的渐进分析示例-矩阵求和(matrix_addition)
void matrix_addition(double **M1,double **M2,int k)
{
for (int i=0;i<k;i++)
for(int j=0;j<k;j++)
M1[i][j] = M1[i][j] + M2[i][j];
}
最好、最坏和平均情况——求矩阵M中绝对值最大的元素
double abs_biggest(double **M,int k)
{
double current_big = 0;
for (int i = 0;j<k;j++)
for (int j = 0;i<k;j++){
double temp = fabs(M[i][j]);
if (temp > current_big)
current_big = temp;
}
return current_big;
}
相关知识
园艺科学Introduction
Introduction, Preservation, Evaluation and Innovation of Germplasm Resources of Zingiberaceae Flower
浅谈城市树木对缓解城市热岛效应的作用 A Brief Introduction to the Impacts of Urban Trees on Mitigating the Urban Heat Island Effects
An introduction to the research and application of phytolith morphometrics
木槿引种适应性及抗逆性研究进展
五种高山植物的花部特征变异及其对繁殖成功的影响
我国农业害虫天敌昆虫利用三十年回顾(下篇)
06|链(上):写一篇完美鲜花推文?用SequencialChain链接不同的组件
盆栽亚洲百合新品种的性状分析及综合评价
顺应论视角下《乐高传》(节选)英汉翻译实践报告
原文链接: Introduction https://www.huajiangbk.com/newsview1074217.html
| 上一篇: 冰糖橙 | 下一篇: “燃烧冰激凌”+“开花橙子”:长... |





