MCPcopy Create free account
hub / github.com/creatale/node-dv / ptr

Method ptr

deps/opencv/modules/core/src/matrix.cpp:3839–3859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3837}
3838
3839uchar* SparseMat::ptr(int i0, bool createMissing, size_t* hashval)
3840{
3841 CV_Assert( hdr && hdr->dims == 1 );
3842 size_t h = hashval ? *hashval : hash(i0);
3843 size_t hidx = h & (hdr->hashtab.size() - 1), nidx = hdr->hashtab[hidx];
3844 uchar* pool = &hdr->pool[0];
3845 while( nidx != 0 )
3846 {
3847 Node* elem = (Node*)(pool + nidx);
3848 if( elem->hashval == h && elem->idx[0] == i0 )
3849 return &value<uchar>(elem);
3850 nidx = elem->next;
3851 }
3852
3853 if( createMissing )
3854 {
3855 int idx[] = { i0 };
3856 return newNode( idx, h );
3857 }
3858 return 0;
3859}
3860
3861uchar* SparseMat::ptr(int i0, int i1, bool createMissing, size_t* hashval)
3862{

Callers 15

getMatVectorMethod · 0.45
copyToMethod · 0.45
convertToMethod · 0.45
operator()Method · 0.45
findNonZeroMethod · 0.45
calcCovarMatrixMethod · 0.45
writeMatFunction · 0.45
calcSparseHist_Function · 0.45
calcSparseHist_8uFunction · 0.45
operator()Method · 0.45
operator()Method · 0.45
cvtColorMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected