📄 global.cpp
字号:
/****************************************************************************
NJU Magic. Copyright (c) 2007. All Rights Reserved.
--------------------------------------------------------------------
Permission to use, copy, or modify this software and its documentation
for educational and research purposes only and without fee is hereby
granted, provided that this copyright notice appear on all copies and
supporting documentation. For any other uses of this software, in
original or modified form, including but not limited to distribution
in whole or in part, specific prior permission must be obtained from
NJU Magic and the authors. These programs shall not be used, rewritten,
or adapted as the basis of a commercial software or hardware product
without first obtaining appropriate licenses from NJU Magic. NJU Magic
makes no representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
---------------------------------------------------------------------
File: global.cpp
Authors: Yao Wei
Date Created : 2007-8-11
****************************************************************************/
#include "global.h"
void myprint(const char * tchar)
{
time_t now;
time(&now);
printf("\n####################################################\n"
"%s\t%30s"
"####################################################\n\n",
tchar, ctime(&now));
}
void printhelp()
{
fprintf(stderr,"Usage (Press Enter to see more)\n");
(void)getc(stdin);
printf("(1): boost <max_iter> <trainfile> <modelfile>\n"
"\tmax_iter -> maximum number of Boosting step (<int>)\n"
"\ttrainfile -> the train file (<string>)\n"
"\tmodelfile -> the model file of trained Boosting (<string>)\n\n"
"(2): boost <-test> <modelfile> <testfile>\n"
"\tmodelfile -> the model file of trained Boosting (<string>)\n"
"\ttestfile -> the test file (<string>)\n\n"
"(3): boost <-predict> <modelfile> <predictfile> [outfile]\n"
"\tmodelfile -> the model file of trained Boosting (<string>)\n"
"\tpredictfile -> the predict file (<string>)\n"
"\toutfile -> the result file (<string>)\n\n");
}
void ** mymalloc2d(size_t size,int m, int n)
{
void ** t = (void **)malloc(size * m);
for(int i=0; i<m; i++)
t[i] = malloc(size*n);
return t;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -