------------------------------------------------------------------------------
| 2336 | |
| 2337 | //------------------------------------------------------------------------------ |
| 2338 | void vtkReebGraph::Implementation::ResizeMainLabelTable(int newSize) |
| 2339 | { |
| 2340 | int oldsize, i; |
| 2341 | if ((this->MainLabelTable.Size - this->MainLabelTable.Number) < newSize) |
| 2342 | { |
| 2343 | oldsize = this->MainLabelTable.Size; |
| 2344 | if (!this->MainLabelTable.Size) |
| 2345 | this->MainLabelTable.Size = newSize; |
| 2346 | while ((this->MainLabelTable.Size - this->MainLabelTable.Number) < newSize) |
| 2347 | this->MainLabelTable.Size <<= 1; |
| 2348 | |
| 2349 | this->MainLabelTable.Buffer = (vtkReebLabel*)realloc( |
| 2350 | this->MainLabelTable.Buffer, sizeof(vtkReebLabel) * this->MainLabelTable.Size); |
| 2351 | |
| 2352 | for (i = oldsize; i < this->MainLabelTable.Size - 1; i++) |
| 2353 | { |
| 2354 | this->GetLabel(i)->ArcId = i + 1; |
| 2355 | this->GetLabel(i)->HNext = -2; |
| 2356 | } |
| 2357 | |
| 2358 | this->GetLabel(i)->ArcId = this->MainLabelTable.FreeZone; |
| 2359 | this->GetLabel(i)->HNext = -2; |
| 2360 | this->MainLabelTable.FreeZone = oldsize; |
| 2361 | } |
| 2362 | } |
| 2363 | |
| 2364 | //------------------------------------------------------------------------------ |
| 2365 | vtkIdType vtkReebGraph::Implementation::AddPath( |