Commits

Jay Barra committed 25d347b

updates with a real IDE, but can't compile, oh irony

  • Participants
  • Parent commits 53d1621

Comments (0)

Files changed (1)

File Firefly/main.cpp

 #define MESSAGE_TAG 1000
 #define WORK_TAG    1001
 //---------------------------------------------------------------------------
+#define LAMBDA 0.2
+//---------------------------------------------------------------------------
+struct Position {
+    float x;
+    float y;
+};
+
+struct Firefly {
+    struct Position current_pos;
+    float current_fitness;
+
+    struct Position best_pos;
+    float best_fitness;
+};
+//---------------------------------------------------------------------------
+// Algorithm Functions
+void  updateFirefly(struct Firefly f);
+
+float percievedBrightnes(struct Firefly f1, struct Firefly f2);
+float fitness(struct Firefly& f);
+
+float distance(struct Position p1, struct Position p2);
+//---------------------------------------------------------------------------
+// MPI Functions
 void getStatus(MPI_Status status, char* pcStatus);
 //---------------------------------------------------------------------------
 main (int argc, char** argv)