From bb77ca8f6e18e5a3ee2996095db5394dcd49197a Mon Sep 17 00:00:00 2001
From: Samo Penic <samo@andromeda>
Date: Sat, 04 Dec 2010 14:31:17 +0000
Subject: [PATCH] Datastructure & basic functions rewritten. It seems there is no memory leaks in simple operations.

---
 src/vertex.h |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/vertex.h b/src/vertex.h
index 8a2a99f..e0df249 100644
--- a/src/vertex.h
+++ b/src/vertex.h
@@ -10,12 +10,17 @@
  *	@param zero_them is boolean value. 0 skip setting zeros to idx 
  *      and (x,y,z) coordinates for each points, 1 means to zero all 
  *      information on points > 1 requests zeroing of coordinates and 
- *      indexing the vertexes 0..N-1.
+ *      indexing the vertices 0..N-1.
  *	@returns ts_bool value 1 on success, 0 otherwise
 */
 ts_vertex_list *init_vertex_list(ts_uint N);
-ts_vertex *init_vertex(ts_uint idx);
-ts_bool vtx_add_neighbour(ts_vertex **vtx, ts_vertex **nvtx);
-ts_bool vtx_free(ts_vertex **vtx);
+ts_vertex_data *init_vertex_data(void);
+ts_bool vtx_add_neighbour(ts_vertex *vtx, ts_vertex *nvtx);
+ts_bool vtx_add_cneighbour(ts_bond_list *blist,ts_vertex *vtx1,ts_vertex *vtx2);
+ts_bool vtx_add_bond(ts_bond_list *blist,ts_vertex *vtx1,ts_vertex *vtx2);
+ts_bool vtx_remove_neighbour(ts_vertex *vtx, ts_vertex *nvtx);
+ts_bool vtx_data_free(ts_vertex_data *data);
+ts_bool vtx_free(ts_vertex *vtx);
 ts_bool vtx_list_free(ts_vertex_list *vlist);
+inline ts_double vtx_distance_sq(ts_vertex *vtx1, ts_vertex *vtx2);
 #endif

--
Gitblit v1.9.3