MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / Get

Method Get

src/c_api.cpp:1882–1898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1880}
1881
1882double CSC_RowIterator::Get(int idx) {
1883 while (idx > cur_idx_ && !is_end_) {
1884 auto ret = iter_fun_(nonzero_idx_);
1885 if (ret.first < 0) {
1886 is_end_ = true;
1887 break;
1888 }
1889 cur_idx_ = ret.first;
1890 cur_val_ = ret.second;
1891 ++nonzero_idx_;
1892 }
1893 if (idx == cur_idx_) {
1894 return cur_val_;
1895 } else {
1896 return 0.0f;
1897 }
1898}
1899
1900std::pair<int, double> CSC_RowIterator::NextNonZero() {
1901 if (!is_end_) {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected