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

Method copyTo

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

Source from the content-addressed store, hash-verified

3695}
3696
3697void SparseMat::copyTo( SparseMat& m ) const
3698{
3699 if( hdr == m.hdr )
3700 return;
3701 if( !hdr )
3702 {
3703 m.release();
3704 return;
3705 }
3706 m.create( hdr->dims, hdr->size, type() );
3707 SparseMatConstIterator from = begin();
3708 size_t i, N = nzcount(), esz = elemSize();
3709
3710 for( i = 0; i < N; i++, ++from )
3711 {
3712 const Node* n = from.node();
3713 uchar* to = m.newNode(n->idx, n->hashval);
3714 copyElem( from.ptr, to, esz );
3715 }
3716}
3717
3718void SparseMat::copyTo( Mat& m ) const
3719{

Callers 8

cloneMethod · 0.95
MatMethod · 0.45
push_backMethod · 0.45
hconcatMethod · 0.45
vconcatMethod · 0.45
transposeMethod · 0.45
kmeansMethod · 0.45
cvCrossProductFunction · 0.45

Calls 8

copyElemFunction · 0.85
nodeMethod · 0.80
newNodeMethod · 0.80
typeFunction · 0.50
elemSizeFunction · 0.50
releaseMethod · 0.45
createMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected