当前位置: 首页>>代码示例>>C++>>正文


C++ AzOut类代码示例

本文整理汇总了C++中AzOut的典型用法代码示例。如果您正苦于以下问题:C++ AzOut类的具体用法?C++ AzOut怎么用?C++ AzOut使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AzOut类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: print

void AzTimeLog::print(const char *msg, const AzOut &out) 
{
  if (out.isNull()) return; 
  _printTime(out); 
  AzPrint::writeln(out, msg); 
  out.flush(); 
}
开发者ID:YaweiZhao,项目名称:distributed_svrg_on_dmtk_2.0,代码行数:7,代码来源:AzUtil.cpp

示例2: 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(); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:7,代码来源:AzPrint.hpp

示例3: reset

 inline void reset(const AzOut &out) {
   o = NULL; 
   if (!out.isNull()) {
     o = out.o; 
   }
   level = out.getLevel(); 
   dlm = NULL; 
   count = 0; 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:9,代码来源:AzPrint.hpp

示例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(); 
}
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:29,代码来源:AzOptOnTree.cpp

示例5: 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(); 
 } 
开发者ID:DeercoderCourse,项目名称:NLP,代码行数:7,代码来源:AzpLmAdaD.hpp

示例6: 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(); 
  }
}
开发者ID:fukatani,项目名称:rgf_python,代码行数:27,代码来源:AzTrTreeFeat.cpp

示例7: 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(); 
  }
}
开发者ID:Anushaa,项目名称:HiggsML,代码行数:32,代码来源:AzIntPool.cpp

示例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(); 
   }
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:9,代码来源:AzDataForTrTree.hpp

示例9: 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(); 
 }    
开发者ID:DeercoderCourse,项目名称:NLP,代码行数:9,代码来源:AzpData_img.hpp

示例10: _printTime

/*-------------------------------------------------------------*/
void AzTimeLog::_printTime(const AzOut &out)
{
  if (out.isNull()) return; 
  time_t ltime; 
  time(&ltime); 
  AzBytArr str_time(ctime(&ltime)); 
  str_time.strip(); /* remove new line in the end */
  str_time.c(": "); 
  AzPrint::write(out, str_time); 
}
开发者ID:YaweiZhao,项目名称:distributed_svrg_on_dmtk_2.0,代码行数:11,代码来源:AzUtil.cpp

示例11: 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);
}
开发者ID:joshloyal,项目名称:RegularizedGreedyForest,代码行数:12,代码来源:AzTree.cpp

示例12: 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(); 
}
开发者ID:0x0all,项目名称:Kaggle_CrowdFlower,代码行数:54,代码来源:AzTaskTools.cpp

示例13: 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(); 
}
开发者ID:fukatani,项目名称:rgf_python,代码行数:15,代码来源:AzTrTreeFeat.cpp

示例14: 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(); 
}
开发者ID:ZhuZhiMing,项目名称:RGF_Hadoop,代码行数:15,代码来源:AzRgfTree.cpp

示例15: dump

/*-------------------------------------------------------------*/
void AzDmat::dump(const AzOut &out, const char *header, 
                  int max_col, 
                  const AzStrArray *sp_row, 
                  const AzStrArray *sp_col, 
                  int cut_num) const
{
  if (out.isNull()) return; 
  AzPrint o(out); 

  const char *my_header = ""; 
  if (header != NULL) my_header = header; 
  o.writeln(my_header); 

  /* (row,col)=(r,c)\n */
  int c_num = col_num; 
  if (max_col > 0 && max_col < col_num) {
    c_num = max_col; 
  }
  o.printBegin("", ""); 
  o.print("(row,col)="); 
  o.pair_inParen(row_num, col_num, ","); 
  if (c_num < col_num) {
    AzBytArr s(" Showing first "); s.cn(c_num); s.c(" columns only"); 
    o.print(s); 
  }
  o.printEnd(); 

  int cx; 
  for (cx = 0; cx < c_num; ++cx) {
    if (column[cx] == NULL) {
      continue; 
    }

    /* column=cx (col_header) */
    o.printBegin("", " ", "="); 
    o.print("column", cx); 
    if (sp_col != NULL) {
      o.inParen(sp_col->c_str(cx)); 
    }
    o.printEnd();

    column[cx]->dump(out, "", sp_row, cut_num); 
  }
  o.writeln(""); /* blank line */
  o.flush(); 
}
开发者ID:DeercoderCourse,项目名称:NLP,代码行数:47,代码来源:AzDmat.cpp


注:本文中的AzOut类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。