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


C++ AzObjPtrArray类代码示例

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


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

示例1: reset

 void reset() {
   a_dense.free(&arrd); 
   a_sparse.free(&arrs); 
   f_num = 0; 
   ia_isActive.reset(); 
   active_num = 0;   
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:7,代码来源:AzSortedFeat.hpp

示例2: _release

 inline void _release() {
   a_tree.free(&t); t_num = 0; 
   s_config.reset(); 
   s_sign.reset(); 
   const_val = 0; 
   org_dim = -1; 
 }
开发者ID:0x0all,项目名称:Kaggle_CrowdFlower,代码行数:7,代码来源:AzTreeEnsemble.hpp

示例3: reset

 inline void reset() {
   a_tree.free(&t); t_num = 0; 
   const_val = 0; 
   org_dim = -1; 
   s_param.reset(); 
   dt_param = ""; 
   temp_files.reset(); 
 }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:8,代码来源:AzTrTreeEnsemble.hpp

示例4: warm_start

  void warm_start(const AzTreeEnsemble *inp_ens, 
              const AzDataForTrTree *data, 
              AzParam &param,              
              const AzBytArr *s_temp_prefix, 
              const AzOut &out,           
              int max_t_num, 
              int search_t_num, 
              AzDvect *v_p, /* inout */
              const AzIntArr *inp_ia_tr_dx=NULL)
  {
    const char *eyec = "AzTrTreeEnsemble::warmup"; 
    if (max_t_num < inp_ens->size()) {
      throw new AzException(eyec, "maximum #tree is less than the #tree we already have"); 
    }

    reset(); 
    a_tree.alloc(&t, max_t_num, "AzTrTreeEnsemble::warmup"); 
    t_num = inp_ens->size(); 
    const_val = inp_ens->constant(); 
    org_dim = inp_ens->orgdim(); 
    if (org_dim > 0 && org_dim != data->featNum()) {
      throw new AzException(AzInputError, eyec, "feature dimensionality mismatch"); 
    }

    const AzIntArr *ia_tr_dx = inp_ia_tr_dx; 
    AzIntArr ia_temp; 
    if (ia_tr_dx == NULL) {
      ia_temp.range(0, data->dataNum()); 
      ia_tr_dx = &ia_temp; 
    }
    v_p->reform(data->dataNum()); 
    v_p->add(const_val, ia_tr_dx); 

    T dummy_tree(param); 
    if (dummy_tree.usingInternalNodes()) {
      throw new AzException(AzInputError, eyec, 
                "warm start is not allowed with use of internal nodes"); 
    }
    dummy_tree.printParam(out); 

    temp_files.reset(&dummy_tree, data->dataNum(), s_temp_prefix); 

    s_param.reset(param.c_str());   
    dt_param = s_param.c_str(); 
    AzParam p(dt_param, false); 
 
    int tx; 
    for (tx = 0; tx < t_num; ++tx) {
      t[tx] = new T(p); 
      t[tx]->forStoringDataIndexes(temp_files.point_file()); 
      if (search_t_num > 0 && tx < t_num-search_t_num) {
        t[tx]->quick_warmup(inp_ens->tree(tx), data, v_p, ia_tr_dx); 
      }
      else {
        t[tx]->warmup(inp_ens->tree(tx), data, v_p, ia_tr_dx); 
      }
    }    
  }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:58,代码来源:AzTrTreeEnsemble.hpp

示例5: copy_nodes_from

  //! copy nodes only; not split
  void copy_nodes_from(const AzTrTreeEnsemble_ReadOnly *inp) {
    reset(); 
    const_val = inp->constant(); 
    org_dim = inp->orgdim(); 
    t_num = inp->size(); 

    s_param.reset(inp->param_c_str()); 
    dt_param = s_param.c_str(); 
    AzParam p(dt_param, false); 
    a_tree.alloc(&t, t_num, "AzTrTreeEnsemble::copy_nodes_from"); 
    for (int tx = 0; tx < t_num; ++tx) {
      t[tx] = new T(p);
      t[tx]->copy_nodes_from(inp->tree(tx)); 
    }
  }
开发者ID:fukatani,项目名称:rgf_python,代码行数:16,代码来源:AzTrTreeEnsemble.hpp

示例6: AzException

 virtual 
 T *new_tree(int *out_tx=NULL) {
   if (t_num >= a_tree.size()) {
     throw new AzException("AzTrTreeEnsemble::new_tree", "no more empty slot"); 
   }
   int tx = t_num; 
   if (t[tx] != NULL) {
     throw new AzException("AzTrTreeEnsemble::new_tree", "something is wrong"); 
   }
   AzParam p(dt_param, false); 
   t[tx] = new T(p); 
   t[tx]->forStoringDataIndexes(temp_files.point_file()); 
   ++t_num; 
   if (out_tx != NULL) {
     *out_tx = tx; 
   }
   return t[tx]; 
 }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:18,代码来源:AzTrTreeEnsemble.hpp

示例7: alloc

 /** @ alloc the Tree pointer array*/
 inline void alloc(int num, const char *msg="") {
   a_tree.alloc(&t, num, "AzTrTreeEnsemble::alloc", msg); 
 }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:4,代码来源:AzTrTreeEnsemble.hpp

示例8: isFull

 inline bool isFull() const {
   if (t_num >= a_tree.size()) {
     return true; 
   }
   return false; 
 }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:6,代码来源:AzTrTreeEnsemble.hpp

示例9: max_size

 inline int max_size() const { return a_tree.size(); }
开发者ID:NavinManaswi,项目名称:RGF_Hadoop,代码行数:1,代码来源:AzTrTreeEnsemble.hpp

示例10: _release

 void _release() {
   a.free(&column); col_num = 0; 
   row_num = 0; 
 }
开发者ID:YaweiZhao,项目名称:distributed_svrg_on_dmtk_2.0,代码行数:4,代码来源:AzSmat.hpp

示例11: _release

 void _release() {
   checkLock("_release"); 
   a.free(&column); col_num = 0; 
   row_num = 0; 
   dummy_zero.reform(0); 
 }
开发者ID:liangwuli1992,项目名称:svrg2.0,代码行数:6,代码来源:AzDmat.hpp


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