summaryrefslogtreecommitdiff
path: root/src/spheres_poly/event.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/spheres_poly/event.cpp')
-rw-r--r--src/spheres_poly/event.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/spheres_poly/event.cpp b/src/spheres_poly/event.cpp
new file mode 100644
index 0000000..c8c104d
--- /dev/null
+++ b/src/spheres_poly/event.cpp
@@ -0,0 +1,65 @@
+#include "event.h"
+
+//==============================================================
+//==============================================================
+// Class Event
+//==============================================================
+//==============================================================
+
+
+//==============================================================
+// Constructor
+//==============================================================
+event::event(double time_i, int i_i, int j_i, vector<DIM,int> v_i):
+ time(time_i),
+ i(i_i),
+ j(j_i),
+ v(v_i)
+{
+}
+
+event::event(double time_i, int i_i, int j_i):
+ time(time_i),
+ i(i_i),
+ j(j_i)
+{
+}
+
+event::event(const event& e)
+{
+ time = e.time;
+ i = e.i;
+ j = e.j;
+ v = e.v;
+}
+
+event::event()
+{
+}
+
+
+//==============================================================
+// Destructor
+//==============================================================
+event::~event()
+{
+}
+
+void event::erase()
+{
+ time = dblINF;
+ i = 0;
+ j = 0;
+}
+
+bool event::operator<(const event& e) const
+{
+ return e.time < time;
+}
+
+bool event::operator>(const event& e) const
+{
+ return e.time > time;
+}
+
+