| 289 | typename rhs_type |
| 290 | > |
| 291 | bool is_forced_assignment_problem ( |
| 292 | const std::vector<std::pair<std::vector<lhs_type>, std::vector<rhs_type> > >& samples, |
| 293 | const std::vector<std::vector<long> >& labels |
| 294 | ) |
| 295 | { |
| 296 | if (is_assignment_problem(samples, labels)) |
| 297 | { |
| 298 | for (unsigned long i = 0; i < samples.size(); ++i) |
| 299 | { |
| 300 | const unsigned long N = sum(mat(labels[i]) != -1); |
| 301 | if (std::min(samples[i].first.size(), samples[i].second.size()) != N) |
| 302 | return false; |
| 303 | } |
| 304 | return true; |
| 305 | } |
| 306 | |
| 307 | return false; |
| 308 | } |
| 309 | |
| 310 | // ---------------------------------------------------------------------------------------- |
| 311 | |