Code

committed patch 1710682 by jfaith
authorjiho-sf <jiho-sf@users.sourceforge.net>
Tue, 1 May 2007 21:41:07 +0000 (21:41 +0000)
committerjiho-sf <jiho-sf@users.sourceforge.net>
Tue, 1 May 2007 21:41:07 +0000 (21:41 +0000)
- in src/libcola/cola.cpp, isnan is used and not the cross-platform definition isNaN defined in isnan.h => replaced isnan by isNaN and included isnan.h
- add math.h include in src/libcola/gradient_projection.cpp
This was necessary because libcola does not compile for OS X 10.3.9

src/libcola/cola.cpp
src/libcola/gradient_projection.cpp

index 74cab50daca440f4225bfcc311443bff56c2d4fb..afad49eb2f59ba786375d60b5b386a4217e0e408 100644 (file)
@@ -2,6 +2,7 @@
 #include "conjugate_gradient.h"
 #include "straightener.h"
 #include "shortest_paths.h"
+#include "isnan.h"
 
 namespace cola {
 
@@ -131,7 +132,7 @@ void ConstrainedMajorizationLayout::majlayout(
             }
             b[i] += degree * coords[i];
         }
-        assert(!isnan(b[i]));
+        assert(!isNaN(b[i]));
     }
     if(constrainedLayout) {
         setupDummyVars();
index 78b141b3e788ffb003cb01e3894df288da984cc6..94844ca881c0bda3b8c95c308eb785234e0f2df2 100644 (file)
@@ -19,7 +19,7 @@
 #include <iostream>
 #include "isnan.h"
 #include "isinf.h"
-
+#include <math.h>
 
 using namespace std;
 using namespace vpsc;