Fixed build problems on windows

release/4.3a0
Richard Roberts 2012-06-07 04:54:06 +00:00
parent 19542c27d5
commit ecd5862a90
2 changed files with 3 additions and 3 deletions

View File

@ -60,8 +60,8 @@ namespace gtsam {
// TODO: Sudoku specific hack // TODO: Sudoku specific hack
if (print) { if (print) {
if (cardinality == 9 && n == 81) { if (cardinality == 9 && n == 81) {
for (size_t i = 0, v = 0; i < sqrt(n); i++) { for (size_t i = 0, v = 0; i < (size_t)sqrt(double(n)); i++) {
for (size_t j = 0; j < sqrt(n); j++, v++) { for (size_t j = 0; j < (size_t)sqrt(double(n)); j++, v++) {
if (changed[v]) cout << "*"; if (changed[v]) cout << "*";
domains[v].print(); domains[v].print();
cout << "\t"; cout << "\t";

View File

@ -75,7 +75,7 @@ public:
} }
// add box constraints // add box constraints
size_t N = sqrt(n), i0 = 0; size_t N = (size_t)sqrt(double(n)), i0 = 0;
for (size_t I = 0; I < N; I++) { for (size_t I = 0; I < N; I++) {
size_t j0 = 0; size_t j0 = 0;
for (size_t J = 0; J < N; J++) { for (size_t J = 0; J < N; J++) {