| 435 | typename EXP |
| 436 | > |
| 437 | typename dlib::enable_if_c<is_matrix<matrix_type>::value && is_same_type<typename inner_type<matrix_type>::type,typename EXP::type>::value >::type |
| 438 | assign_mat ( |
| 439 | const long arg_idx, |
| 440 | matrix_type& m, |
| 441 | const matrix_exp<EXP>& src |
| 442 | ) |
| 443 | { |
| 444 | if (matrix_type::NR != 0 && matrix_type::NR != src.nc()) |
| 445 | { |
| 446 | std::ostringstream sout; |
| 447 | sout << "Argument " << arg_idx+1 << " expects a matrix with " << matrix_type::NR << " rows but got one with " << src.nc(); |
| 448 | throw invalid_args_exception(sout); |
| 449 | } |
| 450 | if (matrix_type::NC != 0 && matrix_type::NC != src.nr()) |
| 451 | { |
| 452 | std::ostringstream sout; |
| 453 | sout << "Argument " << arg_idx+1 << " expects a matrix with " << matrix_type::NC << " columns but got one with " << src.nr(); |
| 454 | throw invalid_args_exception(sout); |
| 455 | } |
| 456 | |
| 457 | |
| 458 | m = trans(src); |
| 459 | } |
| 460 | |
| 461 | template < |
| 462 | typename matrix_type, |
no test coverage detected