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


C++ value_type::invalid方法代码示例

本文整理汇总了C++中value_type::invalid方法的典型用法代码示例。如果您正苦于以下问题:C++ value_type::invalid方法的具体用法?C++ value_type::invalid怎么用?C++ value_type::invalid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在value_type的用法示例。


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

示例1: project_k

  /**
   * Materialize as many of the blocks as possible.
   */
  void project_k (int64_t start, int64_t end) {
    /* Ensure that we can fit this many columns in */
    assert (end < std::numeric_limits<int>::max());
    assert (start < std::numeric_limits<int>::max());

    /* Materialize everything */
    int C = 0;
    for (int64_t i=start; i<end; ++i) {
      /* Get the SNP */
      snp_type SNP = (*map)(i);
     
      /* Skip if filter asks us to skip */
      if ((*filter)(SNP)) continue;
     
      /* Materialize the required vectors */
      (*materializer) (SNP, A_ptr+(C*M));
      ++C;
    }
     
    /* Compute the projections --- A'Y */
    dgemm_ (&TRANS, 
            &NO_TRANS,
            &block_size,        
            &K,        
            &M,       
            &PLUS_ONE, 
            A_ptr,   
            &M,       
            Y_ptr,  
            &M,     
            &PLUS_ONE,
            R_ptr,  
            &block_size);    

    /* Figure out the SNP that can be added (and in which position */
    for (size_t i=0; i<R.size(); ++i) {
      if (result.invalid() || (compare (R[i], result.weight))) {
        result.source = i/block_size;
        result.target = i%block_size;
        result.weight = R[i];
      }
    }
  }
开发者ID:pkambadu,项目名称:Covariance,代码行数:46,代码来源:projector.hpp

示例2: check_and_swap

 /**
  * Extract the maximum value from R. Remember that R is a (block_size,K)
  * dimension matrix. So, when an entry is found, it is pretty easy to tell
  * which row and column it belongs to.
  */
 void check_and_swap (value_type new_result) {
   if (result.invalid() || (compare (new_result.weight, result.weight))) 
     result = new_result;
 }
开发者ID:pkambadu,项目名称:Covariance,代码行数:9,代码来源:projector.hpp

示例3: join

 /** 
  * Add up the two matrices.
  */
 void join(projector_t& other) {
   if(result.invalid() || compare (other.result.weight, result.weight))
     result = other.result;
 }
开发者ID:pkambadu,项目名称:Covariance,代码行数:7,代码来源:projector.hpp


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