summaryrefslogtreecommitdiff
blob: 8f1bde25a038650ce481c675330f051e7b46c4b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Description: adoptation to alglib3.
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2013-05-16

--- a/qtiplot/src/analysis/dialogs/GriddingDialog.cpp
+++ b/qtiplot/src/analysis/dialogs/GriddingDialog.cpp
@@ -41,7 +41,7 @@
 #include <QComboBox>
 #include <QLayout>
 
-#include <idwint.h>
+#include <interpolation.h>
 
 GriddingDialog::GriddingDialog(Table* t, const QString& colName, int nodes, QWidget* parent, Qt::WFlags fl )
 	: QDialog( parent, fl ),
@@ -365,26 +365,27 @@
 	Matrix* m = app->newMatrix(rows, cols);
 	m->setCoordinates(xmin, xmax, ymin, ymax);
 
-	idwinterpolant z;
+	alglib::idwinterpolant z;
+  
 	switch (boxMethod->currentIndex()){
 		case 0:
-			idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
+			alglib::idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
 		break;
 		case 1:
-			idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+			alglib::idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
 		break;
 		case 2:
-			idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+			alglib::idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
 		break;
 	}
 
-	ap::real_1d_array p;
+	alglib::real_1d_array p;
 	p.setlength(2);
 	for (int i = 0; i < rows; i++){
 		p(1) = ymin + i*ystep;
 		for (int j = 0; j < cols; j++){
 			p(0) = xmin + j*xstep;
-			m->setCell(i, j, idwcalc(z, p));
+			m->setCell(i, j, alglib::idwcalc(z, p));
 		}
 	}
 
@@ -435,20 +436,20 @@
 	double xstep = fabs(xmax - xmin)/(cols - 1);
 	double ystep = fabs(ymax - ymin)/(rows - 1);
 
-	idwinterpolant z;
+	alglib::idwinterpolant z;
 	switch (boxMethod->currentIndex()){
 		case 0:
-			idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
+			alglib::idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
 		break;
 		case 1:
-			idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+			alglib::idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
 		break;
 		case 2:
-			idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+			alglib::idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
 		break;
 	}
 
-	ap::real_1d_array p;
+	alglib::real_1d_array p;
 	p.setlength(2);
 
 	double **data_matrix = Matrix::allocateMatrixData(cols, rows);
@@ -456,7 +457,7 @@
 		p(1) = ymin + i*ystep;
 		for (int j = 0; j < cols; j++){
 			p(0) = xmin + j*xstep;
-			data_matrix[j][i] = idwcalc(z, p);
+			data_matrix[j][i] = alglib::idwcalc(z, p);
 		}
 	}
 
--- a/qtiplot/src/analysis/dialogs/GriddingDialog.h
+++ b/qtiplot/src/analysis/dialogs/GriddingDialog.h
@@ -71,7 +71,7 @@
 
 	QString d_col_name;
 	int d_nodes;
-	ap::real_2d_array xy;
+	alglib::real_2d_array xy;
 
 	QPushButton* buttonFit;
 	QPushButton* buttonCancel;
--- a/qtiplot/src/matrix/MatrixModel.cpp
+++ b/qtiplot/src/matrix/MatrixModel.cpp
@@ -45,7 +45,7 @@
 #include <stdlib.h>
 
 #ifdef HAVE_ALGLIB
-	#include <spline2d.h>
+	#include <interpolation.h>
 #endif
 
 MatrixModel::MatrixModel(int rows, int cols, QObject *parent)
@@ -1026,7 +1026,7 @@
 #ifdef HAVE_ALGLIB
 	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 
-	ap::real_2d_array oldValues, newValues;
+	alglib::real_2d_array oldValues, newValues;
 	oldValues.setlength(d_rows, d_cols);
 	newValues.setlength(rows, cols);