opencog/destin — pull request #7 by jswiergo (2013-10-27 12:26:16+00:00)
Title: Resizable arrays for dynamic operations on centroids

* Added library (array.h) for dynamic operations on arrays that are used as core DeSTIN internal structures. The array allows insertion and deletion of elements and reallocates memory using similar heuristic to STL vector (doubling the size when it needs), which gives more efficiency.

* Removed previous implementation of adding and killing centroids because it created the whole new DeSTIN instance each time the centroid was added or deleted. The new implementation (centroid.c) is not finished yet.

* Reorganized initialization of core DeSTIN internal structures.
* Changed the flat arrays that were indexed by offsets to multidimensional arrays that are more flexible.
* Introduced initialization of resizable arrays using MALLOCV.

* Removed unused genObservation structure.
* Refactored the code that calculates uf_avgAbsDelta and uf_absvar.

* Removed czt_test/test1.cpp from build. Do not want to support backward compatibility with this test code.

* Added unit tests for array operations. Unit tests for addition/deletion of centroids are still to be done.