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

Function cvInitSparseMatIterator

deps/opencv/modules/core/src/array.cpp:614–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612
613
614CvSparseNode*
615cvInitSparseMatIterator( const CvSparseMat* mat, CvSparseMatIterator* iterator )
616{
617 CvSparseNode* node = 0;
618 int idx;
619
620 if( !CV_IS_SPARSE_MAT( mat ))
621 CV_Error( CV_StsBadArg, "Invalid sparse matrix header" );
622
623 if( !iterator )
624 CV_Error( CV_StsNullPtr, "NULL iterator pointer" );
625
626 iterator->mat = (CvSparseMat*)mat;
627 iterator->node = 0;
628
629 for( idx = 0; idx < mat->hashsize; idx++ )
630 if( mat->hashtable[idx] )
631 {
632 node = iterator->node = (CvSparseNode*)mat->hashtable[idx];
633 break;
634 }
635
636 iterator->curidx = idx;
637 return node;
638}
639
640#define ICV_SPARSE_MAT_HASH_MULTIPLIER cv::SparseMat::HASH_SCALE
641

Callers 8

SparseMatMethod · 0.85
cvCopyFunction · 0.85
icvWriteSparseMatFunction · 0.85
icvGetNodePtrFunction · 0.85
cvThreshHistFunction · 0.85
cvNormalizeHistFunction · 0.85
cvGetMinMaxHistValueFunction · 0.85
cvCompareHistFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected