[arrayfire] 34/284: cleanup and scatter example update
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit 4ec314a225140e0d0078fc4542dab2ce65ce0c04
Author: syurkevi <stefan at arrayfire.com>
Date: Mon Nov 23 15:08:49 2015 -0500
cleanup and scatter example update
---
examples/graphics/plot2d.cpp | 5 +++--
src/api/cpp/graphics.cpp | 1 -
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/examples/graphics/plot2d.cpp b/examples/graphics/plot2d.cpp
index c6d3452..7593f8a 100644
--- a/examples/graphics/plot2d.cpp
+++ b/examples/graphics/plot2d.cpp
@@ -13,7 +13,7 @@
using namespace af;
-static const int ITERATIONS = 100;
+static const int ITERATIONS = 50;
static const float PRECISION = 1.0f/ITERATIONS;
int main(int argc, char *argv[])
@@ -26,6 +26,7 @@ int main(int argc, char *argv[])
array Y;
int sign = 1;
array X = seq(-af::Pi, af::Pi, PRECISION);
+ array noise = randn(X.dims(0))/5.f;
myWindow.grid(1, 2);
for (double val=-af::Pi; !myWindow.close(); ) {
@@ -33,7 +34,7 @@ int main(int argc, char *argv[])
Y = sin(X);
myWindow(0,0).plot(X, Y);
- myWindow(0,1).scatter(X, Y, AF_MARKER_POINT);
+ myWindow(0,1).scatter(X, Y + noise, AF_MARKER_POINT);
myWindow.show();
diff --git a/src/api/cpp/graphics.cpp b/src/api/cpp/graphics.cpp
index 8d2d8cd..cb9b080 100644
--- a/src/api/cpp/graphics.cpp
+++ b/src/api/cpp/graphics.cpp
@@ -99,7 +99,6 @@ void Window::hist(const array& X, const double minval, const double maxval, cons
}
void Window::surface(const array& S, const char* const title){
- //TODO: fix offset on forge?
af::array xVals = seq(0, S.dims(0)-1);
af::array yVals = seq(0, S.dims(1)-1);
af_cell temp{_r, _c, title, AF_COLORMAP_DEFAULT};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list