主题:[讨论]数据类型
vfdff
[专家分:740] 发布于 2008-06-18 00:22:00
Mm DLLI colon();
Mm DLLI colon(cMm j);
Mm DLLI colon(double j, double k);
Mm DLLI colon(cMm j, cMm k);
Mm DLLI colon(double j, double i, double k);
Mm DLLI colon(cMm j, cMm i, cMm k);
上面代码 的函数声明 是不是表明这些函数是动态库函数(DLLI ) ??
另外这个 Mm ,cMm 分别是什么类型呀 ?VC++中没有这个类型,该怎么转化
回复列表 (共5个回复)
沙发
vfdff [专家分:740] 发布于 2008-06-18 13:43:00
#include <stdio.h>
#include "matlib.h"
#include "Gau.h"
int main()
{
dMm(y);
printf("%d\n",Gau(3.4) );
y = Gau(3.4);
printf("%d,%d\n",sizeof(y) ,y);
return 0;
}
// 使用上面的代码测试 Mm 类型,发现sizeof(y)=92 ,好恐怖呀,这个什么类型,怎么这么大!
板凳
dongyuanxun [专家分:7180] 发布于 2008-06-19 23:02:00
猜测Mm是一个矩阵的class类,cMm是矩阵的维数的数据类型吧,矩阵元素多的话,当然sizeof就大了
3 楼
vfdff [专家分:740] 发布于 2008-06-21 19:01:00
在 matlab.h 中找到了定义
class Mc {
friend class Mm;
const Mm* initd[Mcinitsz];
int initdyn[Mcinitsz];
const Mm** d;
int* dyn;
int siz;
int last;
int cl;
void DLLI operator =(const Mc&);
public:
DLLI Mc();
DLLI Mc(const Mc& x);
DLLI Mc(int new_cl, int new_dyn, cMm x);
DLLI ~Mc();
const Mm* br(int idx) const { return d[idx-1]; }
int size() const { return last+1; }
Mc RDLLI operator ,(cMm x);
Mc RDLLI operator ,(const char* x);
Mc RDLLI operator ,(double x);
};
4 楼
dongyuanxun [专家分:7180] 发布于 2008-06-22 13:21:00
[quote]在 matlab.h 中找到了定义
class Mc {
friend class Mm;
const Mm* initd[Mcinitsz];
int initdyn[Mcinitsz];
const Mm** d;
int* dyn;
int siz;
int last;
int cl;
void DLLI operator =(const Mc&);
public:
DLLI Mc();
DLLI Mc(const Mc& x);
DLLI Mc(int new_cl, int new_dyn, cMm x);
DLLI ~Mc();
const Mm* br(int idx) const { return d[idx-1]; }
int size() const { return last+1; }
Mc RDLLI operator ,(cMm x);
Mc RDLLI operator ,(const char* x);
Mc RDLLI operator ,(double x);
};
[/quote]
貌似是matcom里的
5 楼
vfdff [专家分:740] 发布于 2008-06-22 14:09:00
恩 ,这个matlab.h文件确实在matcom中
而不是在matlab中
我来回复