|
|
@ -414,12 +414,6 @@ public: |
|
|
|
|
|
|
|
|
|
|
|
void loadIndex(FILE* stream) |
|
|
|
void loadIndex(FILE* stream) |
|
|
|
{ |
|
|
|
{ |
|
|
|
load_value(stream, branching_); |
|
|
|
|
|
|
|
load_value(stream, trees_); |
|
|
|
|
|
|
|
load_value(stream, centers_init_); |
|
|
|
|
|
|
|
load_value(stream, leaf_size_); |
|
|
|
|
|
|
|
load_value(stream, memoryCounter); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
free_elements(); |
|
|
|
free_elements(); |
|
|
|
|
|
|
|
|
|
|
|
if (root!=NULL) { |
|
|
|
if (root!=NULL) { |
|
|
@ -430,6 +424,12 @@ public: |
|
|
|
delete[] indices; |
|
|
|
delete[] indices; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
load_value(stream, branching_); |
|
|
|
|
|
|
|
load_value(stream, trees_); |
|
|
|
|
|
|
|
load_value(stream, centers_init_); |
|
|
|
|
|
|
|
load_value(stream, leaf_size_); |
|
|
|
|
|
|
|
load_value(stream, memoryCounter); |
|
|
|
|
|
|
|
|
|
|
|
indices = new int*[trees_]; |
|
|
|
indices = new int*[trees_]; |
|
|
|
root = new NodePtr[trees_]; |
|
|
|
root = new NodePtr[trees_]; |
|
|
|
for (int i=0; i<trees_; ++i) { |
|
|
|
for (int i=0; i<trees_; ++i) { |
|
|
|