本文整理汇总了C++中AzOut::isNull方法的典型用法代码示例。如果您正苦于以下问题:C++ AzOut::isNull方法的具体用法?C++ AzOut::isNull怎么用?C++ AzOut::isNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AzOut
的用法示例。
在下文中一共展示了AzOut::isNull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printParam
void printParam(const AzOut &out, const char *pfx) const {
if (out.isNull()) return;
AzPrint o(out, pfx);
o.printV(kw_rho, rho);
o.printV(kw_eps, eps);
o.printEnd();
}
示例2: dump
/*------------------------------------------------------------------*/
void AzIntPool::dump(const AzOut &out, const char *header) const
{
if (out.isNull()) return;
AzPrint o(out);
if (header != NULL) {
o.writeln(header);
}
int num = size();
int ix;
for (ix = 0; ix < num; ++ix) {
o.printBegin("", ", ");
/* fprintf(out.fp, "[%5ld],%4ld,", ix, getCount(ix)); */
o.inBrackets(ix,5); o.print(getCount(ix),4);
int ints_num;
const int *ints = point(ix, &ints_num);
AzBytArr s("(");
int jx;
for (jx = 0; jx < ints_num; ++jx) {
if (jx > 0) {
s.c(",");
}
s.cn(ints[jx]);
}
s.c(")");
o.print(s);
o.printEnd();
}
}
示例3: print
void AzTimeLog::print(const char *msg, const AzOut &out)
{
if (out.isNull()) return;
_printTime(out);
AzPrint::writeln(out, msg);
out.flush();
}
示例4: printParam
/*--------------------------------------------------------*/
void AzOptOnTree::printParam(const AzOut &out,
bool beVerbose) const
{
if (out.isNull()) return;
AzPrint o(out);
o.reset_options();
o.set_precision(5);
o.ppBegin("AzOptOnTree", "Optimization");
o.printV("loss=", AzLoss::lossName(loss_type));
o.printV(kw_max_ite_num, max_ite_num);
o.printV(kw_lambda, lambda);
o.printV_posiOnly(kw_sigma, sigma);
o.printV(kw_eta, eta);
o.printV(kw_exit_delta, exit_delta);
o.printV(kw_max_delta, max_delta);
o.printSw(kw_doUseAvg, doUseAvg);
o.printSw(kw_doIntercept, doIntercept);
o.printSw(kw_opt_beVerbose, beVerbose);
/*--- these are fixed; displaying for maintenance purpose only ---*/
o.printSw("doRefershP", doRefreshP);
o.printSw("doUnregIntercept", doUnregIntercept); /* unregularized intercept */
o.ppEnd();
}
示例5: dump
/*------------------------------------------------------------------*/
void AzTrTreeFeat::dump(const AzOut &out, const char *header) const
{
if (out.isNull()) return;
AzPrint o(out);
o.printBegin(header);
o.printSw("doAllowZeroWeightLeaf", doAllowZeroWeightLeaf);
o.printSw("doCountRules", doCountRules);
o.printSw("doCheckConsistency", doCheckConsistency);
o.printEnd();
ip_featDef.dump(dmp_out, "ip_featDef");
int f_num = featNum();
int fx;
for (fx = 0; fx < f_num; ++fx) {
const AzTrTreeFeatInfo *fp = f_inf.point(fx);
o.printBegin("", ", ", "=");
o.inBrackets(fx);
o.print("isRemoved", fp->isRemoved);
o.print("tx", fp->tx);
o.print("nx", fp->nx);
o.print("rule length", fp->rule.length());
o.printEnd();
}
}
示例6: writeln
void writeln(const char *txt, int ind_len) {
if (out.isNull()) return;
AzBytArr s(txt);
_multi_lines(&s, ind_len);
AzBytArr s_ind; s_ind.fill(' ', ind_len);
AzPrint::writeln(out, s_ind, s);
}
示例7: AzPrint
inline AzPrint(const AzOut &out) : o(NULL), dlm(NULL), name_dlm(NULL),
count(0), useDlm(true), level(0) {
if (!out.isNull()) {
o = out.o;
}
level = out.getLevel();
}
示例8: printParam
virtual void printParam(const AzOut &out) const {
if (out.isNull()) return;
AzPrint o(out);
if (s_dataproc.length() > 0) {
o.ppBegin("AzDataForTrTree", "Data processing");
o.printV(kw_dataproc, s_dataproc);
o.ppEnd();
}
}
示例9: reset
inline void reset(const AzOut &out) {
o = NULL;
if (!out.isNull()) {
o = out.o;
}
level = out.getLevel();
dlm = NULL;
count = 0;
}
示例10: printParam_data
virtual void printParam_data(const AzOut &out) const {
if (out.isNull()) return;
AzPrint o(out);
o.printV(kw_channels, channels);
o.printV(kw_sz1, sz1);
o.printV(kw_sz2, sz2);
o.printV(kw_data_scale, data_scale);
o.printEnd();
}
示例11: _printTime
/*-------------------------------------------------------------*/
void AzTimeLog::_printTime(const AzOut &out)
{
if (out.isNull()) return;
time_t ltime;
time(<ime);
AzBytArr str_time(ctime(<ime));
str_time.strip(); /* remove new line in the end */
str_time.c(": ");
AzPrint::write(out, str_time);
}
示例12: show
/*--------------------------------------------------------*/
void AzTree::show(const AzSvFeatInfo *feat, const AzOut &out,
const char *header) const
{
if (out.isNull()) return;
AzPrint::writeln(out, header);
if (nodes == NULL) {
AzPrint::writeln(out, "AzTree::show, No tree\n");
return;
}
_show(feat, root_nx, 0, out);
}
示例13: dumpWeights
/*------------------------------------------------------------------*/
void AzTaskTools::dumpWeights(const AzOut &out,
const AzDvect *v_w,
const char *name,
const AzSvFeatInfo *feat,
int print_max,
bool changeLine)
{
if (out.isNull()) return;
AzPrint o(out);
o.write(name);
o.writeln(" -----");
AzIFarr ifa_ex_weight;
v_w->nonZero(&ifa_ex_weight);
int num = ifa_ex_weight.size();
ifa_ex_weight.sort_Float(false); /* descending order */
/*----- print largest weights -----*/
int ix;
for (ix = 0; ix < num; ++ix) {
if (ix >= print_max) break;
int ex;
double val = ifa_ex_weight.get(ix, &ex);
AzBytArr str_weight;
formatWeight(feat, ex, val, &str_weight);
o.write(str_weight);
if (changeLine) {
o.newLine();
}
}
o.newLine(); o.newLine();
if (num > print_max) {
/*----- print smallest weights -----*/
for (ix = num - 1; ix >= 0; --ix) {
if (num - ix > print_max) break;
int ex;
double val = ifa_ex_weight.get(ix, &ex);
AzBytArr str_weight;
formatWeight(feat, ex, val, &str_weight);
o.write(str_weight);
if (changeLine) {
o.newLine();
}
}
o.newLine(); o.newLine();
}
o.flush();
}
示例14: printParam
/*------------------------------------------------------------------*/
void AzTrTreeFeat::printParam(const AzOut &out) const
{
if (out.isNull()) return;
if (!doCountRules && !doCheckConsistency) {
return;
}
AzPrint o(out);
o.ppBegin("AzTrTreeFeat", "Feature management", ", ");
o.printSw(kw_doCountRules, doCountRules);
o.printSw(kw_doCheckConsistency, doCheckConsistency);
o.ppEnd();
}
示例15: printParam
/*--------------------------------------------------------*/
void AzRgfTree::printParam(const AzOut &out) const
{
if (out.isNull()) return;
AzPrint o(out);
o.reset_options();
o.ppBegin("AzRgfTree", "Tree-level", ", ");
o.printV(kw_max_depth, max_depth);
o.printV(kw_min_size, min_size);
o.printV(kw_max_leaf_num, max_leaf_num);
o.printSw(kw_doUseInternalNodes, doUseInternalNodes);
o.printSw(kw_tree_beVerbose, beVerbose);
o.ppEnd();
}