📄 tlm3.c
字号:
/*
* MATLAB Compiler: 3.0
* Date: Sun May 13 16:47:41 2007
* Arguments: "-B" "macro_default" "-O" "all" "-O" "fold_scalar_mxarrays:on"
* "-O" "fold_non_scalar_mxarrays:on" "-O" "optimize_integer_for_loops:on" "-O"
* "array_indexing:on" "-O" "optimize_conditionals:on" "-M" "-silentsetup" "-d"
* "d:/MATLAB6p5/work/nnToolKit/src" "-B" "csglcom:nnToolKit,nnToolKit,2.0"
* "-B" "sgl" "-m" "-W" "main" "-L" "C" "-t" "-T" "link:exe" "-h"
* "libmmfile.mlib" "-W" "mainhg" "libmwsglm.mlib" "-t" "-W"
* "comhg:nnToolKit,nnToolKit,2.0" "-T" "link:lib" "-h" "libmmfile.mlib" "-i"
* "-i" "D:/MATLAB6p5/work/nnToolKit/lmnet/LmSimu.m"
* "D:/MATLAB6p5/work/nnToolKit/lmnet/LmTrain.m"
* "D:/MATLAB6p5/work/nnToolKit/sofm/SofmSimu.m"
* "D:/MATLAB6p5/work/nnToolKit/sofm/SofmTrain.m"
*/
#include "tlm3.h"
#include "learnlm.h"
#include "libmatlbm.h"
#include "libmmfile.h"
#include "nncpyd.h"
#include "nncpyi.h"
#include "nndef.h"
#include "nntobsf.h"
#include "ploterr.h"
#include "plotfa.h"
#include "simuff.h"
#include "sumsqr.h"
static mxChar _array1_[4] = { 't', 'l', 'm', '3' };
static mxArray * _mxarray0_;
static mxChar _array3_[54] = { 'U', 's', 'e', ' ', 'N', 'N', 'T', '2', 'F',
'F', ' ', 'a', 'n', 'd', ' ', 'T', 'R', 'A',
'I', 'N', ' ', 't', 'o', ' ', 'u', 'p', 'd',
'a', 't', 'e', ' ', 'a', 'n', 'd', ' ', 't',
'r', 'a', 'i', 'n', ' ', 'y', 'o', 'u', 'r',
' ', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.' };
static mxArray * _mxarray2_;
static mxChar _array5_[21] = { 'N', 'o', 't', ' ', 'e', 'n', 'o',
'u', 'g', 'h', ' ', 'a', 'r', 'g',
'u', 'm', 'e', 'n', 't', 's', '.' };
static mxArray * _mxarray4_;
static mxArray * _mxarray6_;
static double _array8_[8] = { 25.0, 1000.0, .02, .0001, .001, 10.0, .1, 1e+10 };
static mxArray * _mxarray7_;
static mxChar _array10_[5] = { 'd', 'e', 'l', 't', 'a' };
static mxArray * _mxarray9_;
static mxArray * _mxarray11_;
static mxChar _array13_[46] = { 'T', 'R', 'A', 'I', 'N', 'L', 'M', ':',
' ', '%', '%', 'g', '/', '%', 'g', ' ',
'e', 'p', 'o', 'c', 'h', 's', ',', ' ',
'm', 'u', ' ', '=', ' ', '%', '%', 'g',
',', ' ', 'S', 'S', 'E', ' ', '=', ' ',
'%', '%', 'g', '.', 0x005c, 'n' };
static mxArray * _mxarray12_;
static mxArray * _mxarray14_;
static mxArray * _mxarray15_;
static mxChar _array17_[1] = { 'm' };
static mxArray * _mxarray16_;
static mxChar _array19_[1] = { ' ' };
static mxArray * _mxarray18_;
static mxChar _array21_[58] = { 'T', 'R', 'A', 'I', 'N', 'L', 'M', ':', ' ',
'E', 'r', 'r', 'o', 'r', ' ', 'g', 'r', 'a',
'd', 'i', 'e', 'n', 't', ' ', 'i', 's', ' ',
't', 'o', 'o', ' ', 's', 'm', 'a', 'l', 'l',
' ', 't', 'o', ' ', 'c', 'o', 'n', 't', 'i',
'n', 'u', 'e', ' ', 'l', 'e', 'a', 'r', 'n',
'i', 'n', 'g', '.' };
static mxArray * _mxarray20_;
static mxChar _array23_[52] = { 'T', 'R', 'A', 'I', 'N', 'L', 'M', ':', ' ',
'N', 'e', 't', 'w', 'o', 'r', 'k', ' ', 'e',
'r', 'r', 'o', 'r', ' ', 'd', 'i', 'd', ' ',
'n', 'o', 't', ' ', 'r', 'e', 'a', 'c', 'h',
' ', 't', 'h', 'e', ' ', 'e', 'r', 'r', 'o',
'r', ' ', 'g', 'o', 'a', 'l', '.' };
static mxArray * _mxarray22_;
static mxChar _array25_[53] = { ' ', ' ', 'F', 'u', 'r', 't', 'h', 'e', 'r',
' ', 't', 'r', 'a', 'i', 'n', 'i', 'n', 'g',
' ', 'm', 'a', 'y', ' ', 'b', 'e', ' ', 'n',
'e', 'c', 'e', 's', 's', 'a', 'r', 'y', ',',
' ', 'o', 'r', ' ', 't', 'r', 'y', ' ', 'd',
'i', 'f', 'f', 'e', 'r', 'e', 'n', 't' };
static mxArray * _mxarray24_;
static mxChar _array27_[56] = { ' ', ' ', 'i', 'n', 'i', 't', 'i', 'a',
'l', ' ', 'w', 'e', 'i', 'g', 'h', 't',
's', ' ', 'a', 'n', 'd', ' ', 'b', 'i',
'a', 's', 'e', 's', ' ', 'a', 'n', 'd',
'/', 'o', 'r', ' ', 'm', 'o', 'r', 'e',
' ', 'h', 'i', 'd', 'd', 'e', 'n', ' ',
'n', 'e', 'u', 'r', 'o', 'n', 's', '.' };
static mxArray * _mxarray26_;
void InitializeModule_tlm3(void) {
_mxarray0_ = mclInitializeString(4, _array1_);
_mxarray2_ = mclInitializeString(54, _array3_);
_mxarray4_ = mclInitializeString(21, _array5_);
_mxarray6_ = mclInitializeDoubleVector(0, 0, (double *)NULL);
_mxarray7_ = mclInitializeDoubleVector(1, 8, _array8_);
_mxarray9_ = mclInitializeString(5, _array10_);
_mxarray11_ = mclInitializeDouble(1.0);
_mxarray12_ = mclInitializeString(46, _array13_);
_mxarray14_ = mclInitializeDouble(0.0);
_mxarray15_ = mclInitializeDouble(6.0);
_mxarray16_ = mclInitializeString(1, _array17_);
_mxarray18_ = mclInitializeString(1, _array19_);
_mxarray20_ = mclInitializeString(58, _array21_);
_mxarray22_ = mclInitializeString(52, _array23_);
_mxarray24_ = mclInitializeString(53, _array25_);
_mxarray26_ = mclInitializeString(56, _array27_);
}
void TerminateModule_tlm3(void) {
mxDestroyArray(_mxarray26_);
mxDestroyArray(_mxarray24_);
mxDestroyArray(_mxarray22_);
mxDestroyArray(_mxarray20_);
mxDestroyArray(_mxarray18_);
mxDestroyArray(_mxarray16_);
mxDestroyArray(_mxarray15_);
mxDestroyArray(_mxarray14_);
mxDestroyArray(_mxarray12_);
mxDestroyArray(_mxarray11_);
mxDestroyArray(_mxarray9_);
mxDestroyArray(_mxarray7_);
mxDestroyArray(_mxarray6_);
mxDestroyArray(_mxarray4_);
mxDestroyArray(_mxarray2_);
mxDestroyArray(_mxarray0_);
}
static mxArray * Mtlm3(mxArray * * b1,
mxArray * * w2,
mxArray * * b2,
mxArray * * w3,
mxArray * * b3,
mxArray * * i,
mxArray * * tr,
int nargout_,
mxArray * w1_in,
mxArray * b1_in,
mxArray * f1,
mxArray * w2_in,
mxArray * b2_in,
mxArray * f2,
mxArray * w3_in,
mxArray * b3_in,
mxArray * f3,
mxArray * p,
mxArray * t,
mxArray * tp);
_mexLocalFunctionTable _local_function_table_tlm3
= { 0, (mexFunctionTableEntry *)NULL };
/*
* The function "mlfTlm3" contains the normal interface for the "tlm3"
* M-function from file "d:\matlab6p5\toolbox\nnet\nnobsolete\tlm3.m" (lines
* 1-187). This function processes any input arguments and passes them to the
* implementation version of the function, appearing above.
*/
mxArray * mlfTlm3(mxArray * * b1,
mxArray * * w2,
mxArray * * b2,
mxArray * * w3,
mxArray * * b3,
mxArray * * i,
mxArray * * tr,
mxArray * w1_in,
mxArray * b1_in,
mxArray * f1,
mxArray * w2_in,
mxArray * b2_in,
mxArray * f2,
mxArray * w3_in,
mxArray * b3_in,
mxArray * f3,
mxArray * p,
mxArray * t,
mxArray * tp) {
int nargout = 1;
mxArray * w1 = NULL;
mxArray * b1__ = NULL;
mxArray * w2__ = NULL;
mxArray * b2__ = NULL;
mxArray * w3__ = NULL;
mxArray * b3__ = NULL;
mxArray * i__ = NULL;
mxArray * tr__ = NULL;
mlfEnterNewContext(
7,
12,
b1,
w2,
b2,
w3,
b3,
i,
tr,
w1_in,
b1_in,
f1,
w2_in,
b2_in,
f2,
w3_in,
b3_in,
f3,
p,
t,
tp);
if (b1 != NULL) {
++nargout;
}
if (w2 != NULL) {
++nargout;
}
if (b2 != NULL) {
++nargout;
}
if (w3 != NULL) {
++nargout;
}
if (b3 != NULL) {
++nargout;
}
if (i != NULL) {
++nargout;
}
if (tr != NULL) {
++nargout;
}
w1
= Mtlm3(
&b1__,
&w2__,
&b2__,
&w3__,
&b3__,
&i__,
&tr__,
nargout,
w1_in,
b1_in,
f1,
w2_in,
b2_in,
f2,
w3_in,
b3_in,
f3,
p,
t,
tp);
mlfRestorePreviousContext(
7,
12,
b1,
w2,
b2,
w3,
b3,
i,
tr,
w1_in,
b1_in,
f1,
w2_in,
b2_in,
f2,
w3_in,
b3_in,
f3,
p,
t,
tp);
if (b1 != NULL) {
mclCopyOutputArg(b1, b1__);
} else {
mxDestroyArray(b1__);
}
if (w2 != NULL) {
mclCopyOutputArg(w2, w2__);
} else {
mxDestroyArray(w2__);
}
if (b2 != NULL) {
mclCopyOutputArg(b2, b2__);
} else {
mxDestroyArray(b2__);
}
if (w3 != NULL) {
mclCopyOutputArg(w3, w3__);
} else {
mxDestroyArray(w3__);
}
if (b3 != NULL) {
mclCopyOutputArg(b3, b3__);
} else {
mxDestroyArray(b3__);
}
if (i != NULL) {
mclCopyOutputArg(i, i__);
} else {
mxDestroyArray(i__);
}
if (tr != NULL) {
mclCopyOutputArg(tr, tr__);
} else {
mxDestroyArray(tr__);
}
return mlfReturnValue(w1);
}
/*
* The function "mlxTlm3" contains the feval interface for the "tlm3"
* M-function from file "d:\matlab6p5\toolbox\nnet\nnobsolete\tlm3.m" (lines
* 1-187). The feval function calls the implementation version of tlm3 through
* this function. This function processes any input arguments and passes them
* to the implementation version of the function, appearing above.
*/
void mlxTlm3(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
mxArray * mprhs[12];
mxArray * mplhs[8];
int i;
if (nlhs > 8) {
mlfError(
mxCreateString(
"Run-time Error: File: tlm3 Line: 1 Column: 1 The function \"tlm3\""
" was called with more than the declared number of outputs (8)."),
NULL);
}
if (nrhs > 12) {
mlfError(
mxCreateString(
"Run-time Error: File: tlm3 Line: 1 Column: 1 The function \"tlm3\""
" was called with more than the declared number of inputs (12)."),
NULL);
}
for (i = 0; i < 8; ++i) {
mplhs[i] = NULL;
}
for (i = 0; i < 12 && i < nrhs; ++i) {
mprhs[i] = prhs[i];
}
for (; i < 12; ++i) {
mprhs[i] = NULL;
}
mlfEnterNewContext(
0,
12,
mprhs[0],
mprhs[1],
mprhs[2],
mprhs[3],
mprhs[4],
mprhs[5],
mprhs[6],
mprhs[7],
mprhs[8],
mprhs[9],
mprhs[10],
mprhs[11]);
mplhs[0]
= Mtlm3(
&mplhs[1],
&mplhs[2],
&mplhs[3],
&mplhs[4],
&mplhs[5],
&mplhs[6],
&mplhs[7],
nlhs,
mprhs[0],
mprhs[1],
mprhs[2],
mprhs[3],
mprhs[4],
mprhs[5],
mprhs[6],
mprhs[7],
mprhs[8],
mprhs[9],
mprhs[10],
mprhs[11]);
mlfRestorePreviousContext(
0,
12,
mprhs[0],
mprhs[1],
mprhs[2],
mprhs[3],
mprhs[4],
mprhs[5],
mprhs[6],
mprhs[7],
mprhs[8],
mprhs[9],
mprhs[10],
mprhs[11]);
plhs[0] = mplhs[0];
for (i = 1; i < 8 && i < nlhs; ++i) {
plhs[i] = mplhs[i];
}
for (; i < 8; ++i) {
mxDestroyArray(mplhs[i]);
}
}
/*
* The function "Mtlm3" is the implementation version of the "tlm3" M-function
* from file "d:\matlab6p5\toolbox\nnet\nnobsolete\tlm3.m" (lines 1-187). It
* contains the actual compiled code for that M-function. It is a static
* function and must only be called from one of the interface functions,
* appearing below.
*/
/*
* function [w1,b1,w2,b2,w3,b3,i,tr] = tlm3(w1,b1,f1,w2,b2,f2,w3,b3,f3,p,t,tp)
*/
static mxArray * Mtlm3(mxArray * * b1,
mxArray * * w2,
mxArray * * b2,
mxArray * * w3,
mxArray * * b3,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -