回 帖 发 新 帖 刷新版面

主题:[讨论]数据类型

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个回复)

沙发

#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 ,好恐怖呀,这个什么类型,怎么这么大!

板凳

猜测Mm是一个矩阵的class类,cMm是矩阵的维数的数据类型吧,矩阵元素多的话,当然sizeof就大了

3 楼

在 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 楼

[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 楼

恩 ,这个matlab.h文件确实在matcom中
而不是在matlab中

我来回复

您尚未登录,请登录后再回复。点此登录或注册