fixed optional args processing in SVD::compute()

pull/7239/head
Rostislav Vasilikhin 8 years ago
parent 0a3a2df433
commit cb52d249fe
  1. 10
      modules/core/src/lapack.cpp

@ -1560,18 +1560,18 @@ static void _SVDcompute( InputArray _aarr, OutputArray _w,
JacobiSVD(temp_a.ptr<double>(), temp_u.step, temp_w.ptr<double>(), JacobiSVD(temp_a.ptr<double>(), temp_u.step, temp_w.ptr<double>(),
temp_v.ptr<double>(), temp_v.step, m, n, compute_uv ? urows : 0); temp_v.ptr<double>(), temp_v.step, m, n, compute_uv ? urows : 0);
} }
temp_w.copyTo(_w); if(_w.needed()) temp_w.copyTo(_w);
if( compute_uv ) if( compute_uv )
{ {
if( !at ) if( !at )
{ {
transpose(temp_u, _u); if(_u.needed()) transpose(temp_u, _u);
temp_v.copyTo(_vt); if(_vt.needed()) temp_v.copyTo(_vt);
} }
else else
{ {
transpose(temp_v, _u); if(_u.needed()) transpose(temp_v, _u);
temp_u.copyTo(_vt); if(_vt.needed()) temp_u.copyTo(_vt);
} }
} }
} }

Loading…
Cancel
Save