diff options
author | pants <jaron@kent-dobias.com> | 2016-12-07 13:29:51 -0500 |
---|---|---|
committer | pants <jaron@kent-dobias.com> | 2016-12-07 13:29:51 -0500 |
commit | 5ba4109f0021e7b2c9c66821461742a339e07355 (patch) | |
tree | 484ff12ba10a58a21bc3048c07757bb3f4fb6f3e /src/spheres_poly/heap.h | |
parent | cdb18338d3ae54785f311608d303420d5b47d698 (diff) | |
download | fuse_networks-5ba4109f0021e7b2c9c66821461742a339e07355.tar.gz fuse_networks-5ba4109f0021e7b2c9c66821461742a339e07355.tar.bz2 fuse_networks-5ba4109f0021e7b2c9c66821461742a339e07355.zip |
added support for hyperuniform lattices using existing hard-sphere jamming routine
Diffstat (limited to 'src/spheres_poly/heap.h')
-rw-r--r-- | src/spheres_poly/heap.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/spheres_poly/heap.h b/src/spheres_poly/heap.h new file mode 100644 index 0000000..91180e3 --- /dev/null +++ b/src/spheres_poly/heap.h @@ -0,0 +1,42 @@ +//--------------------------------------------------------------------------- +// Event heap maker +//--------------------------------------------------------------------------- + +#ifndef HEAP_H +#define HEAP_H + +#include "event.h" +#include "sphere.h" + +class heap { + + public: + + // constructor and destructor + heap(int maxsize); + heap(const heap &h); + ~heap(); + + // variables + int maxsize; // max allowed number of events + int N; // current number of events + int *a; + sphere *s; + int *index; // array of indices for each sphere + //event minevent; + + + // functions which operate on a binary heap + + void upheap(int k); + void downheap(int k); + void insert(int i); + void replace(int i); + int search(int j); + void change(int i); + int extractmax(); + void print(); + void checkindex(); + +}; +#endif |