本文整理汇总了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];
}
}
}
示例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;
}
示例3: join
/**
* Add up the two matrices.
*/
void join(projector_t& other) {
if(result.invalid() || compare (other.result.weight, result.weight))
result = other.result;
}