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


C++ AzBytArr类代码示例

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


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

示例1: reset

 void reset(T *tree, 
            int data_num, 
            const AzBytArr *inp_s_temp_prefix) {
   reset(); 
   if (inp_s_temp_prefix == NULL || inp_s_temp_prefix->length() <= 0) {
     return; 
   }
   s_temp_prefix.reset(inp_s_temp_prefix); 
   unit_size = tree->estimateSizeofDataIndexes(data_num); 
   if (unit_size <= 0) {
     return; 
   }
   if (unit_size > max_size) {
     throw new AzException(AzInputError, "AzTemp_forTrTreeEns::reset", 
                           "Data size is too large."); 
   }
   open_new_file(); 
 }
开发者ID:Anushaa,项目名称:HiggsML,代码行数:18,代码来源:AzTrTreeEnsemble.hpp

示例2: show_stat

 virtual void show_stat(AzBytArr &s) const {
   if (p.typ == AzpActivDflt_None) return;     
   if (!p.do_stat) return; 
   AzDvect my_v_pop(&v_pop_last); 
   my_v_pop.normalize1(); 
   s.nl(); 
   double accum = 0; 
   int ix; 
   for (ix = 0; ix < my_v_pop.rowNum(); ++ix) {
     accum += my_v_pop.get(ix); 
     s.c("b"); s.cn(v_border.get(ix)); s.c("="); s.cn(my_v_pop.get(ix),3); s.c("("); s.cn(accum,3); s.c("),"); 
   }
 }
开发者ID:DeercoderCourse,项目名称:NLP,代码行数:13,代码来源:AzpActivDflt.hpp

示例3: if

/*--------------------------------------------------------*/
void AzTreeEnsemble::show_weights(const AzOut &out, AzSvFeatInfo *fi) const
{
  AzIIFarr iifa_tx_nx_posiw, iifa_tx_nx_negaw; 
  int tx; 
  for (tx = 0; tx < t_num; ++tx) {
    int nx; 
    for (nx = 0; nx < t[tx]->nodeNum(); ++nx) {
      const AzTreeNode *np = t[tx]->node(nx); 
      if (np->weight > 0) {
        iifa_tx_nx_posiw.put(tx, nx, np->weight); 
      }
      else if (np->weight < 0) {
        iifa_tx_nx_negaw.put(tx, nx, np->weight); 
      }
    }
  }
  iifa_tx_nx_posiw.sort_Float(false); /* descending order */
  iifa_tx_nx_negaw.sort_Float(true); /* ascending order */

  AzPrint::writeln(out, "Positive weights -------------------"); 
  int ix; 
  for (ix = 0; ix < iifa_tx_nx_posiw.size(); ++ix) {
    int tx, nx; 
    double w = iifa_tx_nx_posiw.get(ix, &tx, &nx); 
    AzBytArr s_desc; 
    t[tx]->genDesc(fi, nx, &s_desc); 
    AzBytArr s; s.cn(w, 6, false); s.c(' '); s.c(&s_desc); 
    AzPrint::writeln(out, s); 
  }

  AzPrint::writeln(out, "Negative weights -------------------"); 
  for (ix = 0; ix < iifa_tx_nx_negaw.size(); ++ix) {
    int tx, nx; 
    double w = iifa_tx_nx_negaw.get(ix, &tx, &nx); 
    AzBytArr s_desc; 
    t[tx]->genDesc(fi, nx, &s_desc); 
    AzBytArr s; s.cn(w, 6, false); s.c(' '); s.c(&s_desc); 
    AzPrint::writeln(out, s); 
  }
}
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:41,代码来源:AzTreeEnsemble.cpp

示例4: print_space

 inline void print_space(int len) {
   AzBytArr s; s.fill(' ', len); 
   print(s); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:4,代码来源:AzPrint.hpp

示例5: writeln

 static inline void writeln(const AzOut &out, const AzBytArr &s) {
   writeln(out, s.c_str()); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:3,代码来源:AzPrint.hpp

示例6: inParen

 inline void inParen(const AzBytArr &s) {
   if (o == NULL) return; 
   inParen(s.c_str()); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:4,代码来源:AzPrint.hpp

示例7: inBrackets

 inline void inBrackets(int val, int width=-1, bool doFillZero=false) {
   if (o == NULL) return; 
   itemBegin(); 
   AzBytArr s; inBrackets(&s, val, width, doFillZero); 
   *o<<s.c_str(); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:6,代码来源:AzPrint.hpp

示例8: printV_if_not_empty

 inline void printV_if_not_empty(const char *kw, const AzBytArr &s) {
   if (o == NULL) return; 
   if (s.length() <= 0) return; 
   itemBegin(); 
   *o<<kw<<s.c_str(); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:6,代码来源:AzPrint.hpp

示例9: throw_if_empty

 void throw_if_empty(const char *kw, const AzBytArr &s) const {
   if (s.length() <= 0) throw new AzException(AzInputError, "AzsLinear::resetParam", kw, "must be specified."); 
 }  
开发者ID:codeview2,项目名称:codeview,代码行数:3,代码来源:AzsLinear.hpp

示例10: print

 inline static void print(int number, const char *msg, const AzOut &out) {
   AzBytArr s; s.cn(number); 
   print(s.c_str(), msg, out); 
 }
开发者ID:fukatani,项目名称:rgf_python,代码行数:4,代码来源:AzUtil.hpp

示例11: printV

 inline void printV(const char *kw, const AzBytArr &s) {
   if (o == NULL) return; 
   itemBegin(); 
   *o<<kw<<s.c_str(); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:5,代码来源:AzPrint.hpp

示例12: print

 /*-------------------*/
 inline void print(const AzBytArr &s) {
   if (o == NULL) return; 
   print(s.c_str()); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:5,代码来源:AzPrint.hpp

示例13: reset

 inline void reset(const AzTreeRule *inp) {
   ba.reset(); 
   if (inp == NULL) return; 
   ba.reset(&inp->ba); 
 }
开发者ID:0x0all,项目名称:Kaggle_CrowdFlower,代码行数:5,代码来源:AzTreeRule.hpp

示例14: reset

 void reset() {
   unit_size = -1; 
   s_temp_prefix.reset();
   pool_file.reset(); 
 }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:5,代码来源:AzTrTreeEnsemble.hpp

示例15:

 inline const char *param_c_str() const {
   return s_param.c_str(); 
 }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:3,代码来源:AzTrTreeEnsemble.hpp


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