From 142685b495a80dc7450ffaff88cc87f6083f7681 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 11 Dec 2020 13:07:59 -0700 Subject: [PATCH 1/2] fix azp on windows --- Algorithms/rng.h | 3 +-- BuildTools/windows/GeoDa.vcxproj | 1 + BuildTools/windows/GeoDa.vcxproj.filters | 3 +++ DialogTools/AZPDlg.cpp | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Algorithms/rng.h b/Algorithms/rng.h index e1107b612..b47b5865a 100644 --- a/Algorithms/rng.h +++ b/Algorithms/rng.h @@ -74,8 +74,7 @@ class Xoroshiro128Random #ifdef __WXOSX__ return ((unsigned long long)nextLong() >> 11) * 0x1.0p-53; #else - char tempStr[] = "0x1.0p-53"; - double nd = std::strtod(tempStr, NULL); + double nd = pow(2.0, -53); return ((unsigned long long)nextLong() >> 11) * nd; #endif } diff --git a/BuildTools/windows/GeoDa.vcxproj b/BuildTools/windows/GeoDa.vcxproj index 3e5cd425e..d202a9ac0 100644 --- a/BuildTools/windows/GeoDa.vcxproj +++ b/BuildTools/windows/GeoDa.vcxproj @@ -482,6 +482,7 @@ + diff --git a/BuildTools/windows/GeoDa.vcxproj.filters b/BuildTools/windows/GeoDa.vcxproj.filters index 268453aea..73833d509 100644 --- a/BuildTools/windows/GeoDa.vcxproj.filters +++ b/BuildTools/windows/GeoDa.vcxproj.filters @@ -935,6 +935,9 @@ Algorithms + + Algorithms + diff --git a/DialogTools/AZPDlg.cpp b/DialogTools/AZPDlg.cpp index afbaed775..d263b109c 100644 --- a/DialogTools/AZPDlg.cpp +++ b/DialogTools/AZPDlg.cpp @@ -561,7 +561,7 @@ void AZPDlg::OnOK(wxCommandEvent& event ) // initial = value_initial; //} - // Get initial seed e.g LISA clusters + // Get initial seed e.g LISA clusters, not used std::vector init_regions; bool use_init_regions = chk_lisa->GetValue(); if (use_init_regions) { From 5795d05f26be8a258c132bd1234056ed954bb94d Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 11 Dec 2020 13:25:40 -0700 Subject: [PATCH 2/2] fix connectivity graph on windows issues is caused by another fix of heat map on windows --- GdaShape.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/GdaShape.cpp b/GdaShape.cpp index a9a8c9408..a9183e18d 100644 --- a/GdaShape.cpp +++ b/GdaShape.cpp @@ -1740,6 +1740,19 @@ void GdaPolyLine::paintSelf(wxDC& dc) void GdaPolyLine::paintSelf(wxGraphicsContext* gc) { + if (null_shape) return; + gc->SetPen(getPen()); + gc->SetBrush(getBrush()); + int nx = getXNudge(); + int ny = getYNudge(); + if (n > 1) { + wxGraphicsPath path = gc->CreatePath(); + path.MoveToPoint(points[0].x+nx, points[0].y+ny); + for (int i=0, its=n-1; iStrokePath(path); + } } wxString GdaPolyLine::printDetails()