Compare commits
63 Commits
Author | SHA256 | Date | |
---|---|---|---|
|
4e13972b9a | ||
|
f2e5c23450 | ||
|
4e1bcd276c | ||
|
a5960a5d9c | ||
|
01e4d83fba | ||
|
d781b8b05d | ||
|
a8f7873279 | ||
|
5ea85c47a3 | ||
b48806694c | |||
|
538fe7642f | ||
|
6105352d98 | ||
|
d8508d1933 | ||
|
acf8290ca2 | ||
|
5a94f0b7ec | ||
|
14dd68068d | ||
|
fc4a933e35 | ||
|
fadf103f96 | ||
|
0fc96716bc | ||
|
edb4956e88 | ||
|
506b308478 | ||
|
0f33ab4c32 | ||
|
8fda380bb8 | ||
|
77a35f70e7 | ||
|
82084dc553 | ||
|
2f778be115 | ||
|
cbbceab946 | ||
|
0f3d146402 | ||
|
c9f889f829 | ||
|
6103253cf2 | ||
|
a173f620db | ||
|
68493f2c12 | ||
|
29bf33a777 | ||
|
73f251650b | ||
|
9382c43cc3 | ||
|
cf718baee8 | ||
|
47c9133c09 | ||
|
bcad82ca62 | ||
|
bab0339cf0 | ||
|
45312a6ae3 | ||
|
a08636f73f | ||
|
d58ebfb86c | ||
|
1caf6aa401 | ||
|
5b98921d14 | ||
|
d7ae081c6b | ||
|
94714dcd20 | ||
|
a6084ea37f | ||
|
9f1e6efb44 | ||
|
78e2a80cd3 | ||
|
ae31ee6b5e | ||
|
f4d79de721 | ||
|
2e458e536c | ||
|
0ba81bcc93 | ||
|
6d125421c1 | ||
|
30ee56d9bd | ||
|
c31dfd3da0 | ||
|
3644d8d497 | ||
|
805d45526a | ||
|
93665492cc | ||
|
932471f2be | ||
|
f9a7c5f012 | ||
|
d8583437c7 | ||
|
5ce7b0fe63 | ||
|
14ed71e79d |
@ -1,29 +0,0 @@
|
||||
From c1b7769c37c70d189d09d8dc104d0541433b58b6 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Giboudeaux <christophe@krop.fr>
|
||||
Date: Wed, 12 May 2021 07:27:48 +0200
|
||||
Subject: [PATCH] Fix build with CMake 3.20
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index dfb3bf8..b7c75f0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -112,10 +112,10 @@ elseif(kst_3rdparty_download)
|
||||
elseif(GCC_VERSION VERSION_EQUAL 4.7 OR GCC_VERSION VERSION_GREATER 4.7)
|
||||
set(ver 4.7)
|
||||
set(md5 de6e8dbab1bb17eee6057941fddc93e3)
|
||||
- else(GCC_VERSION VERSION_EQUAL 4.6 OR GCC_VERSION VERSION_GREATER 4.6)
|
||||
+ elseif(GCC_VERSION VERSION_EQUAL 4.6 OR GCC_VERSION VERSION_GREATER 4.6)
|
||||
set(ver 4.6)
|
||||
set(md5 70d8670af9c21eb8fb466654c95d8e4d)
|
||||
- else(GCC_VERSION VERSION_GREATER 4.4)
|
||||
+ elseif(GCC_VERSION VERSION_GREATER 4.4)
|
||||
set(ver 4.4)
|
||||
set(md5 999248fb40a44543af4dd4cd1be0ceeb)
|
||||
else()
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,33 +0,0 @@
|
||||
commit b438fb0d1c831cb8c024eb4dc644aeb5114074e6
|
||||
Author: Christophe Giboudeaux <christophe@krop.fr>
|
||||
Date: Sun Jun 3 19:43:34 2018 +0200
|
||||
|
||||
Fix build with Qt 5.11
|
||||
|
||||
qt5_use_modules was removed in Qt 5.11. use target_link_libraries instead.
|
||||
|
||||
diff --git a/cmake/modules/KstMacros.cmake b/cmake/modules/KstMacros.cmake
|
||||
index 4ff9c151..bc3d8a6c 100644
|
||||
--- a/cmake/modules/KstMacros.cmake
|
||||
+++ b/cmake/modules/KstMacros.cmake
|
||||
@@ -240,7 +240,7 @@ endmacro()
|
||||
macro(kst_link)
|
||||
target_link_libraries(${kst_name} ${ARGV})
|
||||
if(kst_qt5)
|
||||
- qt5_use_modules(${kst_name} Widgets Xml Network PrintSupport)
|
||||
+ target_link_libraries(${kst_name} Qt5::Widgets Qt5::Xml Qt5::Network Qt5::PrintSupport)
|
||||
else()
|
||||
target_link_libraries(${kst_name}
|
||||
${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSVG_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
diff --git a/src/libkstapp/view.h b/src/libkstapp/view.h
|
||||
index 95c8c6a5..2af53938 100644
|
||||
--- a/src/libkstapp/view.h
|
||||
+++ b/src/libkstapp/view.h
|
||||
@@ -14,6 +14,7 @@
|
||||
#define VIEW_H
|
||||
|
||||
#include <QGraphicsView>
|
||||
+#include <QMenu>
|
||||
|
||||
#include "kst_export.h"
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cefbfd3e3710771985e08f02a397ef8ab407168fa8415d2c3c5740c031af18c6
|
||||
size 14527129
|
@ -1,204 +0,0 @@
|
||||
From a9d24f91057441bbd2e3ed9e7536b071121526cb Mon Sep 17 00:00:00 2001
|
||||
From: "D. V. Wiebe" <dvw@ketiltrout.net>
|
||||
Date: Thu, 10 Mar 2016 14:09:26 -0800
|
||||
Subject: [PATCH] GSL-2.x support.
|
||||
|
||||
---
|
||||
src/plugins/fits/non_linear.h | 67 +++++++++++++++++++++-------------
|
||||
src/plugins/fits/non_linear_weighted.h | 66 ++++++++++++++++++++-------------
|
||||
2 files changed, 82 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/fits/non_linear.h b/src/plugins/fits/non_linear.h
|
||||
index 4506704..74e82e7 100644
|
||||
--- a/src/plugins/fits/non_linear.h
|
||||
+++ b/src/plugins/fits/non_linear.h
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <gsl/gsl_blas.h>
|
||||
#include <gsl/gsl_multifit_nlin.h>
|
||||
#include <gsl/gsl_statistics.h>
|
||||
+#include <gsl/gsl_version.h>
|
||||
#include "common.h"
|
||||
|
||||
struct data {
|
||||
@@ -100,6 +101,7 @@ bool kstfit_nonlinear(
|
||||
gsl_multifit_function_fdf function;
|
||||
gsl_vector_view vectorViewInitial;
|
||||
gsl_matrix* pMatrixCovariance;
|
||||
+ gsl_matrix *pMatrixJacobian;
|
||||
struct data d;
|
||||
double dXInitial[NUM_PARAMS];
|
||||
double* pInputX;
|
||||
@@ -177,37 +179,50 @@ bool kstfit_nonlinear(
|
||||
}
|
||||
iIterations++;
|
||||
} while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS );
|
||||
- gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance );
|
||||
-
|
||||
- //
|
||||
- // determine the fitted values...
|
||||
- //
|
||||
- for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
- dXInitial[i] = gsl_vector_get( pSolver->x, i );
|
||||
- }
|
||||
-
|
||||
- for( i=0; i<iLength; i++ ) {
|
||||
- vectorOutYFitted->value()[i] = function_calculate( pInputX[i], dXInitial );
|
||||
- vectorOutYResiduals->value()[i] = pInputY[i] - vectorOutYFitted->value()[i];
|
||||
- }
|
||||
+#if GSL_MAJOR_VERSION >= 2
|
||||
+ pMatrixJacobian = gsl_matrix_alloc( iLength, NUM_PARAMS );
|
||||
+#else
|
||||
+ pMatrixJacobian = pSolver->J;
|
||||
+#endif
|
||||
+ if ( pMatrixJacobian != NULL) {
|
||||
+#if GSL_MAJOR_VERSION >= 2
|
||||
+ gsl_multifit_fdfsolver_jac( pSolver, pMatrixJacobian );
|
||||
+#endif
|
||||
+ gsl_multifit_covar( pMatrixJacobian, 0.0, pMatrixCovariance );
|
||||
+
|
||||
+ //
|
||||
+ // determine the fitted values...
|
||||
+ //
|
||||
+ for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
+ dXInitial[i] = gsl_vector_get( pSolver->x, i );
|
||||
+ }
|
||||
|
||||
- //
|
||||
- // fill in the parameter values and covariance matrix...
|
||||
- //
|
||||
- for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
- vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
|
||||
- for( j=0; j<NUM_PARAMS; j++ ) {
|
||||
- vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
|
||||
+ for( i=0; i<iLength; i++ ) {
|
||||
+ vectorOutYFitted->value()[i] = function_calculate( pInputX[i], dXInitial );
|
||||
+ vectorOutYResiduals->value()[i] = pInputY[i] - vectorOutYFitted->value()[i];
|
||||
}
|
||||
- }
|
||||
|
||||
- //
|
||||
- // determine the value of chi^2/nu
|
||||
- //
|
||||
- scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
|
||||
+ //
|
||||
+ // fill in the parameter values and covariance matrix...
|
||||
+ //
|
||||
+ for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
+ vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
|
||||
+ for( j=0; j<NUM_PARAMS; j++ ) {
|
||||
+ vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- bReturn = true;
|
||||
+ //
|
||||
+ // determine the value of chi^2/nu
|
||||
+ //
|
||||
+ scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
|
||||
|
||||
+ bReturn = true;
|
||||
+
|
||||
+#if GSL_MAJOR_VERSION >= 2
|
||||
+ gsl_matrix_free( pMatrixJacobian );
|
||||
+#endif
|
||||
+ }
|
||||
gsl_matrix_free( pMatrixCovariance );
|
||||
}
|
||||
gsl_multifit_fdfsolver_free( pSolver );
|
||||
diff --git a/src/plugins/fits/non_linear_weighted.h b/src/plugins/fits/non_linear_weighted.h
|
||||
index 6ca7d6f..347ae9d 100644
|
||||
--- a/src/plugins/fits/non_linear_weighted.h
|
||||
+++ b/src/plugins/fits/non_linear_weighted.h
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <gsl/gsl_blas.h>
|
||||
#include <gsl/gsl_multifit_nlin.h>
|
||||
#include <gsl/gsl_statistics.h>
|
||||
+#include <gsl/gsl_version.h>
|
||||
#include "common.h"
|
||||
|
||||
struct data {
|
||||
@@ -101,6 +102,7 @@ bool kstfit_nonlinear_weighted(
|
||||
gsl_multifit_function_fdf function;
|
||||
gsl_vector_view vectorViewInitial;
|
||||
gsl_matrix* pMatrixCovariance;
|
||||
+ gsl_matrix *pMatrixJacobian;
|
||||
struct data d;
|
||||
double dXInitial[NUM_PARAMS];
|
||||
double* pInputs[3];
|
||||
@@ -193,37 +195,51 @@ bool kstfit_nonlinear_weighted(
|
||||
}
|
||||
while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS );
|
||||
|
||||
- gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance );
|
||||
-
|
||||
- //
|
||||
- // determine the fitted values...
|
||||
- //
|
||||
- for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
- dXInitial[i] = gsl_vector_get( pSolver->x, i );
|
||||
- }
|
||||
+#if GSL_MAJOR_VERSION >= 2
|
||||
+ pMatrixJacobian = gsl_matrix_alloc( iLength, NUM_PARAMS );
|
||||
+#else
|
||||
+ pMatrixJacobian = pSolver->J;
|
||||
+#endif
|
||||
+
|
||||
+ if ( pMatrixJacobian != NULL) {
|
||||
+#if GSL_MAJOR_VERSION >= 2
|
||||
+ gsl_multifit_fdfsolver_jac( pSolver, pMatrixJacobian );
|
||||
+#endif
|
||||
+ gsl_multifit_covar( pMatrixJacobian, 0.0, pMatrixCovariance );
|
||||
+
|
||||
+ //
|
||||
+ // determine the fitted values...
|
||||
+ //
|
||||
+ for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
+ dXInitial[i] = gsl_vector_get( pSolver->x, i );
|
||||
+ }
|
||||
|
||||
- for( i=0; i<iLength; i++ ) {
|
||||
- vectorOutYFitted->value()[i] = function_calculate( pInputs[XVALUES][i], dXInitial );
|
||||
- vectorOutYResiduals->value()[i] = pInputs[YVALUES][i] - vectorOutYFitted->value()[i];
|
||||
- }
|
||||
+ for( i=0; i<iLength; i++ ) {
|
||||
+ vectorOutYFitted->value()[i] = function_calculate( pInputs[XVALUES][i], dXInitial );
|
||||
+ vectorOutYResiduals->value()[i] = pInputs[YVALUES][i] - vectorOutYFitted->value()[i];
|
||||
+ }
|
||||
|
||||
- //
|
||||
- // fill in the parameter values and covariance matrix...
|
||||
- //
|
||||
- for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
- vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
|
||||
- for( j=0; j<NUM_PARAMS; j++ ) {
|
||||
- vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
|
||||
+ //
|
||||
+ // fill in the parameter values and covariance matrix...
|
||||
+ //
|
||||
+ for( i=0; i<NUM_PARAMS; i++ ) {
|
||||
+ vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
|
||||
+ for( j=0; j<NUM_PARAMS; j++ ) {
|
||||
+ vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
|
||||
- //
|
||||
- // determine the value of chi^2/nu
|
||||
- //
|
||||
- scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
|
||||
+ //
|
||||
+ // determine the value of chi^2/nu
|
||||
+ //
|
||||
+ scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
|
||||
|
||||
- bReturn = true;
|
||||
+ bReturn = true;
|
||||
|
||||
+#if GSL_MAJOR_VERSION >= 2
|
||||
+ gsl_matrix_free( pMatrixJacobian );
|
||||
+#endif
|
||||
+ }
|
||||
gsl_matrix_free( pMatrixCovariance );
|
||||
}
|
||||
gsl_multifit_fdfsolver_free( pSolver );
|
Loading…
Reference in New Issue
Block a user