| 326 | } |
| 327 | |
| 328 | bool vtkStatisticalModel::SetNumberOfTables(int type, int number) |
| 329 | { |
| 330 | if (type < TableType::Learned || type > TableType::Test) |
| 331 | { |
| 332 | return false; |
| 333 | } |
| 334 | auto it = this->ModelTables.find(type); |
| 335 | if (it == this->ModelTables.end()) |
| 336 | { |
| 337 | this->ModelTables[type].resize(number); |
| 338 | this->Modified(); |
| 339 | return true; |
| 340 | } |
| 341 | if (number < 0 || number == static_cast<int>(it->second.size())) |
| 342 | { |
| 343 | return false; |
| 344 | } |
| 345 | it->second.resize(number); |
| 346 | this->Modified(); |
| 347 | return true; |
| 348 | } |
| 349 | |
| 350 | bool vtkStatisticalModel::SetTable( |
| 351 | int type, int index, vtkTable* table, const std::string& tableName) |