MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Next

Method Next

tensorflow/core/kernels/sparse_cross_op.cc:243–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241 }
242
243 std::vector<int> Next() {
244 std::vector<int> permutation(next_permutation_);
245
246 // Generates next permutation, if available.
247 bool carry = true;
248 for (int i = next_permutation_.size() - 1; i >= 0; i--) {
249 if (carry) {
250 next_permutation_[i] = next_permutation_[i] + 1;
251 }
252 if (next_permutation_[i] == columns_[i]->FeatureCount(batch_index_)) {
253 next_permutation_[i] = 0;
254 } else {
255 carry = false;
256 break;
257 }
258 }
259 has_next_ = !carry;
260 return permutation;
261 }
262
263 bool HasNext() { return has_next_; }
264

Callers 4

AllTensorKeysFunction · 0.45
ComputeMethod · 0.45
InitializeMethod · 0.45

Calls 2

sizeMethod · 0.45
FeatureCountMethod · 0.45

Tested by 1

AllTensorKeysFunction · 0.36