split jkqtcommon into basic tools and jkqtcommon_statistics_and_math for advanced math tools not used by all libs

This commit is contained in:
jkriege2 2022-07-23 15:31:56 +02:00
parent e923a9de7b
commit 8558896f9b
57 changed files with 687 additions and 319 deletions

View File

@ -4,8 +4,8 @@ SUBDIRS += jkqtplotterlib \
jkqtplotterlib_sharedlib \
jkqtmathtextlib \
jkqtmathtextlib_sharedlib \
jkqtpcommonlib \
jkqtpcommonlib_sharedlib \
jkqtcommonlib \
jkqtcommonlib_sharedlib \
jkqtfastplotterlib \
jkqtfastplotterlib_sharedlib \
jkqtmathtext_simpletest \
@ -24,20 +24,20 @@ jkqtplotterlib_sharedlib.file = qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pr
jkqtmathtextlib.file = qmake/staticlib/jkqtmathtextlib/jkqtmathtextlib.pro
jkqtmathtextlib_sharedlib.file = qmake/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro
jkqtpcommonlib.file = qmake/staticlib/jkqtpcommonlib/jkqtpcommonlib.pro
jkqtpcommonlib_sharedlib.file = qmake/sharedlib/jkqtpcommonlib/jkqtpcommonlib.pro
jkqtcommonlib.file = qmake/staticlib/jkqtcommonlib/jkqtcommonlib.pro
jkqtcommonlib_sharedlib.file = qmake/sharedlib/jkqtcommonlib/jkqtcommonlib.pro
jkqtfastplotterlib.file = qmake/staticlib/jkqtfastplotterlib/jkqtfastplotterlib.pro
jkqtfastplotterlib_sharedlib.file = qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro
jkqtmathtext_simpletest.subdir = examples/jkqtmathtext_simpletest
jkqtmathtext_simpletest.depends = jkqtmathtextlib jkqtpcommonlib
jkqtmathtext_simpletest.depends = jkqtmathtextlib jkqtcommonlib
jkqtmathtext_test.subdir = examples/jkqtmathtext_test
jkqtmathtext_test.depends = jkqtplotterlib jkqtpcommonlib
jkqtmathtext_test.depends = jkqtplotterlib jkqtcommonlib
jkqtplotter_simpletest.file = examples/simpletest/simpletest.pro
jkqtplotter_simpletest.depends = jkqtplotterlib jkqtpcommonlib
jkqtplotter_simpletest.depends = jkqtplotterlib jkqtcommonlib
jkqtplot_test.file = examples/jkqtplot_test/jkqtplot_test.pro
jkqtplot_test.depends = jkqtplotterlib

View File

@ -4,8 +4,8 @@ SUBDIRS += jkqtplotterlib \
jkqtplotterlib_sharedlib \
jkqtmathtextlib \
jkqtmathtextlib_sharedlib \
jkqtpcommonlib \
jkqtpcommonlib_sharedlib \
jkqtcommonlib \
jkqtcommonlib_sharedlib \
jkqtfastplotterlib \
jkqtfastplotterlib_sharedlib
@ -16,8 +16,8 @@ jkqtplotterlib_sharedlib.file = qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pr
jkqtmathtextlib.file = qmake/staticlib/jkqtmathtextlib/jkqtmathtextlib.pro
jkqtmathtextlib_sharedlib.file = qmake/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro
jkqtpcommonlib.file = qmake/staticlib/jkqtpcommonlib/jkqtpcommonlib.pro
jkqtpcommonlib_sharedlib.file = qmake/sharedlib/jkqtpcommonlib/jkqtpcommonlib.pro
jkqtcommonlib.file = qmake/staticlib/jkqtcommonlib/jkqtcommonlib.pro
jkqtcommonlib_sharedlib.file = qmake/sharedlib/jkqtcommonlib/jkqtcommonlib.pro
jkqtfastplotterlib.file = qmake/staticlib/jkqtfastplotterlib/jkqtfastplotterlib.pro
jkqtfastplotterlib_sharedlib.file = qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro

55
doc/dox/jkqtcommon.dox Normal file
View File

@ -0,0 +1,55 @@
/*!
\defgroup jkqtptools Support Function libraries (e.g. for JKQTPlotter)
This group contains several tool functions and datatypesthat are neccessary for
JKQTPlotter, JKQTMathtext and the other major classes in this library, but may
also be used separately. The functions and datatypes are sorted into several
functionaly groups.
\defgroup jkqtptools_jkqtcommon JKQTCommon: Diverse Basic Utilities
\ingroup jkqtptools
This summarizes all functions from JKQTCommon-library, which provides basic (Qt-bound) tools for all other libs in the package JKQtPlotter (i.e. also JKQtFastPlotter and JKQtMathText).
\defgroup jkqtptools_math_basic Mathematical Functions & Tools
\ingroup jkqtptools_math
This group assembles a variety of mathematical tool functions that are used in different places.
\defgroup jkqtptools_string String/String-Conversion Tool Functions
\ingroup jkqtptools
Offers diverse function to convert different datatypes (e.g. double, int, diverse enums) to and from strings and for string manipulation.
\defgroup jkqtptools_qt Additional Tools for Qt
\ingroup jkqtptools
\defgroup jkqtptools_qtwidgets Additional Widgets for Qt
\ingroup jkqtptools
\defgroup jkqtptools_drawing Drawing & Graphics Tools
\ingroup jkqtptools
Specialized drawing functions used by the plotters and LaTeX renderers.
\defgroup jkqtptools_debugging Debugging Tools
\ingroup jkqtptools
Functions that help during debugging (e.g. an assert function/macro).
\defgroup jkqtptools_codestructuring Code Structuring Tools
\ingroup jkqtptools
Classes and functions that help to structure the code (e.g. RAII constructs)
*/

View File

@ -0,0 +1,95 @@
/*!
\defgroup jkqtcommon_statistics_and_math JKQTCommonStatisticsAndMath: Special Math and Statistics Utilities
\ingroup jkqtptools
This summarizes all functions from JKQTCommonStatisticsAndMath-library, which provides special and advanced math and statistics tools, mostly used by JKQtPlotter.
\defgroup jkqtptools_algorithms Diverse Algorithms
\ingroup jkqtcommon_statistics_and_math
\defgroup jkqtptools_math Mathematical Computations & Expression Parsing
\ingroup jkqtcommon_statistics_and_math
\defgroup jkqtptools_math_array Data Array Tools
\ingroup jkqtcommon_statistics_and_math
Functions in this group form the basis for the statistics (\ref jkqtptools_math_statistics ) and linear algebra libraries (\ref jkqtptools_math_linalg ), by providing allocation and freeing of (aligned) memory arrays.
\see JKQTPlotterBasicJKQTPDatastoreStatistics
\defgroup jkqtptools_math_linalg Linear Algebra Tools
\ingroup jkqtcommon_statistics_and_math
This group assembles a basic set of linear algebra methods, including matrix inversion, which are required e.g. by the statistics library (\ref jkqtptools_math_statistics )
\defgroup jkqtptools_math_statistics Statistical Computations
\ingroup jkqtcommon_statistics_and_math
This group contains a statistics library, which offers several basic methods and is based on an iterator interface:
- \ref jkqtptools_math_statistics_basic
- \ref jkqtptools_math_statistics_grouped
- \ref jkqtptools_math_statistics_regression
- \ref jkqtptools_math_statistics_poly
- \ref jkqtptools_math_statistics_1dhist
- \ref jkqtptools_math_statistics_2dhist
- \ref jkqtptools_math_statistics_1dkde
- \ref jkqtptools_math_statistics_2dkde
.
In addition there is a set of "adaptors" (see \ref jkqtptools_math_statistics_adaptors ) that shortcut the calculation of a statistical property and the subsequent parametrization of a plot with the results. With these adaptors you can add e.g. a boxplot or histogram chart to a plot by calling only one function.
All statistics functions use an iterator-based interface, comparable to the interface of the <a href="http://www.cplusplus.com/reference/algorithm/">algorithms in the C++ standard template library</a>. To this end, the class `JKQTPDatastore` provides an iterator interface to its columns, using the functions `JKQTPDatastore::begin()` and `JKQTPDatastore::end()`. Both functions simply receive the column ID as parameter and exist in a const and a mutable variant. the latter allows to also edit the data. In addition the function `JKQTPDatastore::backInserter()` returns a back-inserter iterator (like generated for STL containers with `std::back_inserter(container)`) that also allows to append to the column.
Note that the iterator interface allows to use these functions with any container that provides such iterators (e.g. `std::vector<double>`, `std::list<int>`, `std::set<float>`, `QVector<double>`...).
Code using one of these statistics functions therefore may look e.g. like this:
\code
// mean of a column in a JKQTPDatastore:
double mean=jkqtpstatAverage(datastore1->begin(randomdatacol1), datastore1->end(randomdatacol1));
// mean of a std::vector
std::vector<double> data {1,2,4,5,7,8,10,2,1,3,5};
double meanvec=jkqtpstatAverage(data.begin(), data.end());
\endcode
All statistics functions use all values in the given range and convert each value to a `double`, using `jkqtp_todouble()`. The return values is always a dohble. Therefore you can use these functions to calculate statistics of ranges of any type that can be converted to `double`. Values that do not result in a valid `double`are not used in calculating the statistics. Therefore you can exclude values by setting them `JKQTP_DOUBLE_NAN` (i.e. "not a number").
\see see for detailed examples: \ref JKQTPlotterBasicJKQTPDatastoreStatistics
\defgroup jkqtptools_math_statistics_basic Basic statistics
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_grouped Grouped statistics
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_regression Regression Analysis
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_poly Polynomial Fits/Regression
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_1dhist 1-dimensional Histograms
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_2dhist 2-dimensional Histograms
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_1dkde 1-dimensional Kernel Density Estimates
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_1dkde_kernels Kernels for 1-dimensional Histograms
\ingroup jkqtptools_math_statistics_1dkde
\defgroup jkqtptools_math_statistics_2dkde 2-dimensional Kernel Density Estimates
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_2dkde_kernels Kernels for 2-dimensional Histograms
\ingroup jkqtptools_math_statistics_2dkde
\defgroup jkqtptools_math_statistics_adaptors Statistics To Plot Adaptors
\ingroup jkqtptools_math_statistics
*/

View File

@ -1,140 +1,5 @@
/*!
\defgroup jkqtptools Support Function library (e.g. for JKQTPlotter)
This group contains several tool functions and datatypesthat are neccessary for
JKQTPlotter, JKQTMathtext and the other major classes in this library, but may
also be used separately. The functions and datatypes are sorted into several
functionaly groups.
\defgroup jkqtptools_algorithms Diverse Algorithms
\ingroup jkqtptools
\defgroup jkqtptools_math Mathematical Computations & Expression Parsing
\ingroup jkqtptools
\defgroup jkqtptools_math_basic Mathematical Functions & Tools
\ingroup jkqtptools_math
This group assembles a variety of mathematical tool functions that are used in different places.
\defgroup jkqtptools_math_array Data Array Tools
\ingroup jkqtptools_math
Functions in this group form the basis for the statistics (\ref jkqtptools_math_statistics ) and linear algebra libraries (\ref jkqtptools_math_linalg ), by providing allocation and freeing of (aligned) memory arrays.
\see JKQTPlotterBasicJKQTPDatastoreStatistics
\defgroup jkqtptools_math_linalg Linear Algebra Tools
\ingroup jkqtptools_math
This group assembles a basic set of linear algebra methods, including matrix inversion, which are required e.g. by the statistics library (\ref jkqtptools_math_statistics )
\defgroup jkqtptools_math_statistics Statistical Computations
\ingroup jkqtptools_math
This group contains a statistics library, which offers several basic methods and is based on an iterator interface:
- \ref jkqtptools_math_statistics_basic
- \ref jkqtptools_math_statistics_grouped
- \ref jkqtptools_math_statistics_regression
- \ref jkqtptools_math_statistics_poly
- \ref jkqtptools_math_statistics_1dhist
- \ref jkqtptools_math_statistics_2dhist
- \ref jkqtptools_math_statistics_1dkde
- \ref jkqtptools_math_statistics_2dkde
.
In addition there is a set of "adaptors" (see \ref jkqtptools_math_statistics_adaptors ) that shortcut the calculation of a statistical property and the subsequent parametrization of a plot with the results. With these adaptors you can add e.g. a boxplot or histogram chart to a plot by calling only one function.
All statistics functions use an iterator-based interface, comparable to the interface of the <a href="http://www.cplusplus.com/reference/algorithm/">algorithms in the C++ standard template library</a>. To this end, the class `JKQTPDatastore` provides an iterator interface to its columns, using the functions `JKQTPDatastore::begin()` and `JKQTPDatastore::end()`. Both functions simply receive the column ID as parameter and exist in a const and a mutable variant. the latter allows to also edit the data. In addition the function `JKQTPDatastore::backInserter()` returns a back-inserter iterator (like generated for STL containers with `std::back_inserter(container)`) that also allows to append to the column.
Note that the iterator interface allows to use these functions with any container that provides such iterators (e.g. `std::vector<double>`, `std::list<int>`, `std::set<float>`, `QVector<double>`...).
Code using one of these statistics functions therefore may look e.g. like this:
\code
// mean of a column in a JKQTPDatastore:
double mean=jkqtpstatAverage(datastore1->begin(randomdatacol1), datastore1->end(randomdatacol1));
// mean of a std::vector
std::vector<double> data {1,2,4,5,7,8,10,2,1,3,5};
double meanvec=jkqtpstatAverage(data.begin(), data.end());
\endcode
All statistics functions use all values in the given range and convert each value to a `double`, using `jkqtp_todouble()`. The return values is always a dohble. Therefore you can use these functions to calculate statistics of ranges of any type that can be converted to `double`. Values that do not result in a valid `double`are not used in calculating the statistics. Therefore you can exclude values by setting them `JKQTP_DOUBLE_NAN` (i.e. "not a number").
\see see for detailed examples: \ref JKQTPlotterBasicJKQTPDatastoreStatistics
\defgroup jkqtptools_math_statistics_basic Basic statistics
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_grouped Grouped statistics
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_regression Regression Analysis
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_poly Polynomial Fits/Regression
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_1dhist 1-dimensional Histograms
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_2dhist 2-dimensional Histograms
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_1dkde 1-dimensional Kernel Density Estimates
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_1dkde_kernels Kernels for 1-dimensional Histograms
\ingroup jkqtptools_math_statistics_1dkde
\defgroup jkqtptools_math_statistics_2dkde 2-dimensional Kernel Density Estimates
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_math_statistics_2dkde_kernels Kernels for 2-dimensional Histograms
\ingroup jkqtptools_math_statistics_2dkde
\defgroup jkqtptools_math_statistics_adaptors Statistics To Plot Adaptors
\ingroup jkqtptools_math_statistics
\defgroup jkqtptools_string String/String-Conversion Tool Functions
\ingroup jkqtptools
Offers diverse function to convert different datatypes (e.g. double, int, diverse enums) to and from strings and for string manipulation.
\defgroup jkqtptools_qt Additional Tools for Qt
\ingroup jkqtptools
\defgroup jkqtptools_qtwidgets Additional Widgets for Qt
\ingroup jkqtptools
\defgroup jkqtptools_drawing Drawing & Graphics Tools
\ingroup jkqtptools
Specialized drawing functions used by the plotters and LaTeX renderers.
\defgroup jkqtptools_debugging Debugging Tools
\ingroup jkqtptools
Functions that help during debugging (e.g. an assert function/macro).
\defgroup jkqtptools_codestructuring Code Structuring Tools
\ingroup jkqtptools
Classes and functions that help to structure the code (e.g. RAII constructs)
\defgroup jkqtptools_enums Enums for JKQTPlotter (including String Conversion)
\ingroup jkqtptools
Assembles diverse ENUMs required by JKQTPlotter.
\defgroup jkqtplotter JKQTPlotter: Qt based Scientific Plotter Class
A Qt based plotter for 2D scientific graphs. Main Plotting widget is JKQTPlotter.

View File

@ -17,6 +17,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
<li>General:<ul>
<li>CLEANUP (BREAKING) of library structure</li>
<li>NEW: Using precompiled headers in CMake-build to speed up build times</li>
<li>NEW/BREAKING: split jkqtcommon into basic tools and jkqtcommon_statistics_and_math for advanced math tools not used by all libs</li>
</ul></li>
<li>JKQtPlotter:<ul>
<li>FIXED issue described in <a href="https://github.com/jkriege2/JKQtPlotter/pull/62">#62: Fix custom labels draw, because giving exactly two label-strings did not display all of them</a>, thanks to <a href="https://github.com/FalsinSoft">user:FalsinSoft</a></li>

View File

@ -9,7 +9,7 @@
#include "jkqtplotter/graphs/jkqtpscatter.h"
#include "jkqtplotter/graphs/jkqtpbarchart.h"
#include "jkqtplotter/graphs/jkqtpstatisticsadaptors.h"
#include "jkqtcommon/jkqtpstatisticstools.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatisticstools.h"
#include "jkqtcommon/jkqtpstringtools.h"
#include <random>
#include <cmath>

View File

@ -10,7 +10,7 @@
#include "jkqtplotter/graphs/jkqtpboxplot.h"
#include "jkqtplotter/graphs/jkqtpstatisticsadaptors.h"
#include "jkqtplotter/graphs/jkqtpevaluatedfunction.h"
#include "jkqtcommon/jkqtpstatisticstools.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatisticstools.h"
#include "jkqtcommon/jkqtpstringtools.h"
#include <random>
#include <cmath>

View File

@ -10,7 +10,7 @@
#include "jkqtplotter/graphs/jkqtpboxplot.h"
#include "jkqtplotter/graphs/jkqtpstatisticsadaptors.h"
#include "jkqtplotter/graphs/jkqtpevaluatedfunction.h"
#include "jkqtcommon/jkqtpstatisticstools.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatisticstools.h"
#include "jkqtcommon/jkqtpstringtools.h"
#include <random>
#include <cmath>

View File

@ -10,7 +10,7 @@
#include "jkqtplotter/graphs/jkqtpstatisticsadaptors.h"
#include "jkqtplotter/graphs/jkqtpgeometric.h"
#include "jkqtplotter/graphs/jkqtpscatter.h"
#include "jkqtcommon/jkqtpstatisticstools.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatisticstools.h"
#include "jkqtcommon/jkqtpstringtools.h"
#include <random>
#include <cmath>

View File

@ -9,7 +9,7 @@
#include "jkqtplotter/graphs/jkqtpviolinplot.h"
#include "jkqtplotter/graphs/jkqtpsinglecolumnsymbols.h"
#include "jkqtplotter/graphs/jkqtpstatisticsadaptors.h"
#include "jkqtcommon/jkqtpstatisticstools.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatisticstools.h"
#include <random>
#include <cmath>

View File

@ -46,6 +46,7 @@ configure_file(${CMAKE_CURRENT_LIST_DIR}/jkqtplotter_version.h.in
include_directories(.)
add_subdirectory(jkqtcommon)
add_subdirectory(jkqtcommon_statistics_and_math)
add_subdirectory(jkqtmathtext)
add_subdirectory(jkqtfastplotter)
add_subdirectory(jkqtplotter)

View File

@ -1,17 +1,12 @@
# JKQTPlotter: LIB subdirectory
This directory contains all files that belong to the JKQTPlotter library (including the files of the JKQTFastPlotter and JKMathText). There are several ways to add these to your program:
This directory contains all files that belong to the JKQTPlotter library (including the files of the JKQTFastPlotter and JKMathText).
### simply include all necessary files
If you use QMake and simply want to include all necessary files into your project, include one of these `PRI`-files into your QMake Project:
- `jkqtplotter.pri` contains all files in this library, including `JKQTFastPlotter` and `JKQTMathText`
- `jkqtfastplotter.pri` contains only those files from this directory which are necessary to build `JKQTFastPlotter`
- `jkqtmathtext.pri` contains only those files from this directory which are necessary to build `JKQTMathText`
- `jkqtpcommon.pri` common support library for all libraries above (math tools, basic drawing tools, ...)
The single libs are:
- jkqtcommon: general tool functions, used by many of the other libs
- jkqtcommon_statistics_and_math: advanced math features used only by few of the other libs
- jkqtfastplotter: a fast plotter variant wiith fewer features
- jkqtmathtext: a LaTeX parser and renderer used by JKQtPlotter
- jkqtplotter: the full-featured plotter library
### Build static libraries
In the directory [`../staticlib`](../staticlib) you will find several Project files that build a static library of the full JKQTPlotter (including JKQTFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project.
### Build shared libraries (DLLs, SOs, ...)
In the directory [`../sharedlib`](../sharedlib) you will find several Project files that build a dynamic shared library of the full JKQTPlotter (including JKQTFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project.

View File

@ -19,49 +19,28 @@ isEmpty(JKQTP_COMMON_PRI_INCLUDED) {
HEADERS += $$PWD/jkqtcommon/jkqtcommon_imexport.h \
$$PWD/jkqtcommon/jkqtpdebuggingtools.h \
$$PWD/jkqtcommon/jkqtpmathtools.h \
$$PWD/jkqtcommon/jkqtpalgorithms.h \
$$PWD/jkqtcommon/jkqtpstringtools.h \
$$PWD/jkqtcommon/jkqtplinalgtools.h \
$$PWD/jkqtcommon/jkqtpcodestructuring.h \
$$PWD/jkqtcommon/jkqtpbasicimagetools.h \
$$PWD/jkqtcommon/jkqtpgeometrytools.h \
$$PWD/jkqtcommon/jkqtpdrawingtools.h \
$$PWD/jkqtcommon/jkqtpenhancedpainter.h \
$$PWD/jkqtcommon/jkqtphighrestimer.h \
$$PWD/jkqtcommon/jkqtpmathparser.h \
$$PWD/jkqtcommon/jkqttools.h \
$$PWD/jkqtcommon/jkqtparraytools.h \
$$PWD/jkqtcommon/jkqtpstatisticstools.h \
$$PWD/jkqtcommon/jkqtpstatbasics.h \
$$PWD/jkqtcommon/jkqtpstathistogram.h \
$$PWD/jkqtcommon/jkqtpstatkde.h \
$$PWD/jkqtcommon/jkqtpstatregression.h \
$$PWD/jkqtcommon/jkqtpstatpoly.h \
$$PWD/jkqtcommon/jkqtpstatgrouped.h \
$$PWD/jkqtcommon/jkqtpicons.h
SOURCES += $$PWD/jkqtcommon/jkqtpdebuggingtools.cpp \
$$PWD/jkqtcommon/jkqtpmathtools.cpp \
$$PWD/jkqtcommon/jkqtpalgorithms.cpp \
$$PWD/jkqtcommon/jkqtpstringtools.cpp \
$$PWD/jkqtcommon/jkqtplinalgtools.cpp \
$$PWD/jkqtcommon/jkqtpcodestructuring.cpp \
$$PWD/jkqtcommon/jkqtpbasicimagetools.cpp \
$$PWD/jkqtcommon/jkqtpgeometrytools.cpp \
$$PWD/jkqtcommon/jkqtpdrawingtools.cpp \
$$PWD/jkqtcommon/jkqtpenhancedpainter.cpp \
$$PWD/jkqtcommon/jkqtphighrestimer.cpp \
$$PWD/jkqtcommon/jkqtpmathparser.cpp \
$$PWD/jkqtcommon/jkqttools.cpp \
$$PWD/jkqtcommon/jkqtparraytools.cpp \
$$PWD/jkqtcommon/jkqtpstatbasics.cpp \
$$PWD/jkqtcommon/jkqtpstathistogram.cpp \
$$PWD/jkqtcommon/jkqtpstatkde.cpp \
$$PWD/jkqtcommon/jkqtpstatregression.cpp \
$$PWD/jkqtcommon/jkqtpstatpoly.cpp \
$$PWD/jkqtcommon/jkqtpstatgrouped.cpp \
$$PWD/jkqtcommon/jkqtpicons.cpp

View File

@ -23,24 +23,14 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/jkqtpdebuggingtools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpmathtools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpalgorithms.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstringtools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtplinalgtools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpcodestructuring.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpbasicimagetools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpgeometrytools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpdrawingtools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpenhancedpainter.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtphighrestimer.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpmathparser.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqttools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtparraytools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatbasics.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstathistogram.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatkde.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatregression.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatpoly.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatgrouped.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpicons.cpp
)
@ -49,46 +39,20 @@ set(HEADERS
$<INSTALL_INTERFACE:jkqtcommon_imexport.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpdebuggingtools.h>
$<INSTALL_INTERFACE:jkqtpdebuggingtools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpmathtools.h>
$<INSTALL_INTERFACE:jkqtpmathtools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpalgorithms.h>
$<INSTALL_INTERFACE:jkqtpalgorithms.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstringtools.h>
$<INSTALL_INTERFACE:jkqtpstringtools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtplinalgtools.h>
$<INSTALL_INTERFACE:jkqtplinalgtools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpcodestructuring.h>
$<INSTALL_INTERFACE:jkqtpcodestructuring.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpbasicimagetools.h>
$<INSTALL_INTERFACE:jkqtpbasicimagetools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpgeometrytools.h>
$<INSTALL_INTERFACE:jkqtpgeometrytools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpdrawingtools.h>
$<INSTALL_INTERFACE:jkqtpdrawingtools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpenhancedpainter.h>
$<INSTALL_INTERFACE:jkqtpenhancedpainter.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtphighrestimer.h>
$<INSTALL_INTERFACE:jkqtphighrestimer.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpmathparser.h>
$<INSTALL_INTERFACE:jkqtpmathparser.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqttools.h>
$<INSTALL_INTERFACE:jkqttools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtparraytools.h>
$<INSTALL_INTERFACE:jkqtparraytools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatisticstools.h>
$<INSTALL_INTERFACE:jkqtpstatisticstools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatbasics.h>
$<INSTALL_INTERFACE:jkqtpstatbasics.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstathistogram.h>
$<INSTALL_INTERFACE:jkqtpstathistogram.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatkde.h>
$<INSTALL_INTERFACE:jkqtpstatkde.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatregression.h>
$<INSTALL_INTERFACE:jkqtpstatregression.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatpoly.h>
$<INSTALL_INTERFACE:jkqtpstatpoly.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatgrouped.h>
$<INSTALL_INTERFACE:jkqtpstatgrouped.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpicons.h>
$<INSTALL_INTERFACE:jkqtpicons.h>
)

View File

@ -68,4 +68,8 @@
#include <string>
#include <utility>
#include <vector>
#include "jkqtcommon/jkqtpmathtools.h"
#include "jkqtcommon/jkqtpcodestructuring.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#endif // jkqtcommon_precomp_h

View File

@ -0,0 +1,52 @@
# include guard against multiple inclusion
isEmpty(JKQTP_COMMON_STATISCTICS_AND_MATH_PRI_INCLUDED) {
JKQTP_COMMON_STATISCTICS_AND_MATH_PRI_INCLUDED = 1
!win32-msvc* {
QMAKE_CXXFLAGS += -fexceptions
} else {
QMAKE_CXXFLAGS += /EHsc
# /std:c++14
# To enable M_PI, M_E,...
DEFINES += _USE_MATH_DEFINES
# To fix error: C2338: va_start argument must not
# have reference type and must not be parenthesized
DEFINES += _CRT_NO_VA_START_VALIDATION
# fix errors with min()/max() macros from windows
DEFINES += NOMINMAX
}
HEADERS += $$PWD/jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpalgorithms.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtplinalgtools.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpmathparser.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtparraytools.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatisticstools.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatbasics.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstathistogram.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatkde.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatregression.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatpoly.h \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatgrouped.h
SOURCES += $$PWD/jkqtcommon_statistics_and_math/jkqtpalgorithms.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtplinalgtools.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtpmathparser.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtparraytools.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatbasics.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstathistogram.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatkde.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatregression.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatpoly.cpp \
$$PWD/jkqtcommon_statistics_and_math/jkqtpstatgrouped.cpp
INCLUDEPATH += $$PWD
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
CONFIG += c++11
}

View File

@ -0,0 +1,164 @@
cmake_minimum_required(VERSION 3.15)
set(libBasename JKQTCommonStatisticsAndMath)
set(libIncludeSubdir jkqtcommon_statistics_and_math)
if(JKQtPlotter_BUILD_SHARED_LIBS)
set(libsh_name ${libBasename}SharedLib)
set(libsh_name_decorated ${libsh_name}${JKQtPlotter_LIBNAME_ADDITION})
set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
message( STATUS "-- Building ${libsh_name}" )
endif(JKQtPlotter_BUILD_SHARED_LIBS)
if(JKQtPlotter_BUILD_STATIC_LIBS)
set(lib_name ${libBasename}Lib)
set(lib_name_decorated ${lib_name}${JKQtPlotter_LIBNAME_ADDITION})
set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
message( STATUS "-- Building ${lib_name}" )
endif(JKQtPlotter_BUILD_STATIC_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
# Set up source files
set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/jkqtpalgorithms.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtplinalgtools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpmathparser.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtparraytools.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatbasics.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstathistogram.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatkde.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatregression.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatpoly.cpp
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatgrouped.cpp
)
set(HEADERS
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtcommon_statistics_and_math_imexport.h>
$<INSTALL_INTERFACE:jkqtcommon_statistics_and_math_imexport.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtplinalgtools.h>
$<INSTALL_INTERFACE:jkqtplinalgtools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpmathparser.h>
$<INSTALL_INTERFACE:jkqtpmathparser.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtparraytools.h>
$<INSTALL_INTERFACE:jkqtparraytools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatisticstools.h>
$<INSTALL_INTERFACE:jkqtpstatisticstools.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatbasics.h>
$<INSTALL_INTERFACE:jkqtpstatbasics.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstathistogram.h>
$<INSTALL_INTERFACE:jkqtpstathistogram.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatkde.h>
$<INSTALL_INTERFACE:jkqtpstatkde.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatregression.h>
$<INSTALL_INTERFACE:jkqtpstatregression.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatpoly.h>
$<INSTALL_INTERFACE:jkqtpstatpoly.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatgrouped.h>
$<INSTALL_INTERFACE:jkqtpstatgrouped.h>
)
include(CMakePackageConfigHelpers)
function(JKQtCommon_setDefaultLibOptions TARGETNAME)
set_property(TARGET ${TARGETNAME} PROPERTY VERSION "${PROJECT_VERSION}")
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD ${JKQtPlotter_QT_CXX_STANDARD})
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD_REQUIRED ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED})
target_compile_features(${TARGETNAME} PUBLIC ${JKQtPlotter_QT_CXX_COMPILE_FEATURE})
if(MINGW)
# COMPILER-SETTINGS FOR MINGW
target_compile_options(${TARGETNAME} PUBLIC -fexceptions)
elseif(MSVC)
# COMPILER-SETTINGS FOR MS VISUAL C++
target_compile_options(${TARGETNAME} PUBLIC /EHsc)
target_compile_definitions(${TARGETNAME} PUBLIC NOMINMAX)
endif()
target_include_directories(${TARGETNAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# precomiled headers to speed up compilation
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
target_precompile_headers(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtcommon_statistics_and_math_precomp.h)
target_sources(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtcommon_statistics_and_math_precomp.h)
endif(JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
endfunction()
if(JKQtPlotter_BUILD_SHARED_LIBS)
add_library(${libsh_name} SHARED ${SOURCES} ${HEADERS} )
JKQtCommon_setDefaultLibOptions(${libsh_name})
set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}")
target_compile_definitions(${libsh_name} PUBLIC JKQTCOMMON_STATISTICS_AND_MATH_LIB_IN_DLL)
target_compile_definitions(${libsh_name} PRIVATE JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT_LIBRARY)
target_link_libraries(${libsh_name} PUBLIC JKQTCommonSharedLib)
set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion )
endif()
if(JKQtPlotter_BUILD_STATIC_LIBS)
add_library(${lib_name} STATIC ${SOURCES} ${HEADERS})
JKQtCommon_setDefaultLibOptions(${lib_name})
target_link_libraries(${libsh_name} PUBLIC JKQTCommonLib)
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}")
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion )
endif()
# Installation
if(JKQtPlotter_BUILD_SHARED_LIBS)
install(TARGETS ${libsh_name} EXPORT ${libsh_name}_TARGETS
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
)
set(JKQTP_CURRENT_TARGET_FILENAME "${libsh_name}Targets.cmake")
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake" @ONLY)
install(EXPORT ${libsh_name}_TARGETS
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
DESTINATION lib/cmake
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake"
DESTINATION lib/cmake )
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake"
DESTINATION lib/cmake )
endif(JKQtPlotter_BUILD_SHARED_LIBS)
if(JKQtPlotter_BUILD_STATIC_LIBS)
install(TARGETS ${lib_name} EXPORT ${lib_name}_TARGETS
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
)
set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake" @ONLY)
install(EXPORT ${lib_name}_TARGETS
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
DESTINATION lib/cmake
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake"
DESTINATION lib/cmake )
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake"
DESTINATION lib/cmake )
endif(JKQtPlotter_BUILD_STATIC_LIBS)
install(FILES ${HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
COMPONENT Headers)
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_Readme.txt @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_Readme.txt" DESTINATION doc/JKQtPlotter )
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${lib_name}_LICENSE.txt" )

View File

@ -0,0 +1,13 @@
# Package-config file for @libBasename@ library
# (part of JKQtPlotter, version @PROJECT_VERSION@)
#
# see: https://github.com/jkriege2/JKQtPlotter
# Copyright: (c) Jan Krieger <jan@jkrieger.de>
#
# package requires Qt 5/6
find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core REQUIRED)
# include auto-generated targets.cmake file
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")

View File

@ -0,0 +1,94 @@
#ifndef jkqtcommon_statistics_and_math_IMPORT_H
#define jkqtcommon_statistics_and_math_IMPORT_H
/*
Copyright (c) 2008-2022 Jan W. Krieger (<jan@jkrieger.de>)
last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $)
This software is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License (LGPL) as published by
the Free Software Foundation, either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License (LGPL) for more details.
You should have received a copy of the GNU Lesser General Public License (LGPL)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*! \def JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT
\ingroup tools
This define allows to export functions and classes from the jkqtcommon_statistics_and_math-library when building a dynamic/shared library.
Usage is as follows:
\code
#include "jkqtcommon_statistics_and_math_imexport/jkqtcommon_statistics_and_math_imexport.h"
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT exportedClassName {
...
};
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT void exportedFunctionName();
\endcode
These macros append the appropriate \c Q_DECL_EXPORT and \c Q_DECL_IMPORT
to the function/class body and thus tell windows compilers to export these sysmbols from
the shared library, or import them from a shared library.
Note that these attributes are only necessary on windows systems!
These macros are controlled by two other macros:
- \c JKQTCOMMON_STATISTICS_AND_MATH_LIB_IN_DLL declares that the application should link against a shared version of
JKQTCommonStatisticsAndMath, i.e. \c JKQTCommonStatisticsAndMathSharedLib_XYZ .
This needs to be defined while compiling the library and while compiling
any application linking against \c JKQTCommonStatisticsAndMathSharedLib_XYZ.
- \c JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT_LIBRARY is only defined while compiling JKQTCommonStatisticsAndMath into \c JKQTCommonStatisticsAndMathSharedLib_XYZ
and ensures thet the symbols are exported. If it is not defined (e.g. while
compiling an application), the symbols are imported
.
*/
/*! \def JKQTCOMMON_STATISTICS_AND_MATH_LIB_IN_DLL
\ingroup tools
\brief declares that the application should link against a shared version of
JKQTCommonStatisticsAndMath, i.e. \c JKQTCommonStatisticsAndMathSharedLib_XYZ .
This needs to be defined while compiling the library and while compiling
any application linking against \c JKQTCommonStatisticsAndMathSharedLib_XYZ.
*/
/*! \def JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT_LIBRARY
\ingroup tools
\brief is only defined while compiling JKQTCommonStatisticsAndMath into \c JKQTCommonStatisticsAndMathSharedLib_XYZ
and ensures thet the symbols are exported. If it is not defined (e.g. while
compiling an application), the symbols are imported
*/
#include <QtCore/QtGlobal>
# ifdef JKQTCOMMON_STATISTICS_AND_MATH_LIB_IN_DLL
# ifndef JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT
# ifdef JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT_LIBRARY
/* We are building this library */
# define JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT Q_DECL_EXPORT
# else
/* We are using this library */
# define JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT Q_DECL_IMPORT
# endif
# endif
# else
# ifndef JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT
# define JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT
# endif
# endif
#endif // jkqtcommon_statistics_and_math_IMPORT_H

View File

@ -18,4 +18,4 @@
#include "jkqtcommon/jkqtpalgorithms.h"
#include "jkqtcommon_statistics_and_math/jkqtpalgorithms.h"

View File

@ -21,7 +21,7 @@
#ifndef JKQTPALGORITHMS_H_INCLUDED
#define JKQTPALGORITHMS_H_INCLUDED
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"

View File

@ -34,7 +34,7 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#ifdef _OPENMP

View File

@ -35,8 +35,8 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon/jkqtpmathtools.h"
#include "jkqtcommon/jkqtpstringtools.h"

View File

@ -22,7 +22,7 @@
#define COMPILING_THIS_JKMATHPARSER
#define _USE_MATH_DEFINES
#include <cmath>
#include "jkqtcommon/jkqtpmathparser.h" // class's header file
#include "jkqtcommon_statistics_and_math/jkqtpmathparser.h" // class's header file
#include <iostream>
#include <float.h>
#include <ctime>

View File

@ -46,7 +46,7 @@
#include <ctype.h>
#include <list>
#include <utility>
#include "jkqtcommon_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#ifndef JKQTPMATHPARSER_H
#define JKQTPMATHPARSER_H
@ -234,7 +234,7 @@
}
\endcode
*/
class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT JKQTPMathParser
{
protected:
void* data;
@ -314,7 +314,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
/** \brief result of any expression
* \ingroup jkmpultil*/
struct JKQTCOMMON_LIB_EXPORT jkmpResult {
struct JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpResult {
jkmpResult();
bool isValid;
@ -335,7 +335,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* only contains pointers to the data
* \ingroup jkmpultil
*/
struct JKQTCOMMON_LIB_EXPORT jkmpVariable {
struct JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpVariable {
jkmpVariable();
jkmpResultType type; /*!< \brief type of the variable */
bool internal; /*!< \brief this is an internal variable */
@ -347,7 +347,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
/** \brief This struct is for managing temporary variables. It is generally like jkmpVariable.
* \ingroup jkmpultil
*/
struct JKQTCOMMON_LIB_EXPORT jkmpTempVariable {
struct JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpTempVariable {
std::string name; /*!< \brief name of the variable */
jkmpResultType type; /*!< \brief type of the variable */
bool internal; /*!< \brief this is an internal variable */
@ -384,7 +384,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
/** \brief description of a user registered function */
struct JKQTCOMMON_LIB_EXPORT jkmpFunctionDescriptor {
struct JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpFunctionDescriptor {
jkmpEvaluateFunc function; /*!< \brief a pointer to the function implementation */
std::string name; /*!< \brief name of the function */
};
@ -399,7 +399,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* All allowed node types must inherit from jkmpNode
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpNode {
protected:
JKQTPMathParser* parser; /*!< \brief points to the parser object that is used to evaluate this node */
jkmpNode* parent; /*!< \brief points to the parent node */
@ -429,7 +429,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* add (+), subtract (-), multiply (*), divide (/), a to the power of b (a^b)
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpBinaryArithmeticNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpBinaryArithmeticNode: public jkmpNode {
private:
jkmpNode* left, *right;
char operation;
@ -454,7 +454,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* \brief This class represents a binary boolean operation: and, or, xor, nor, nand
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpBinaryBoolNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpBinaryBoolNode: public jkmpNode {
private:
jkmpNode* left, *right;
char operation;
@ -479,7 +479,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* \brief This class represents a binary compare operation: !=, ==, >=, <=, >, <
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpCompareNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpCompareNode: public jkmpNode {
private:
jkmpNode* left, *right;
char operation;
@ -504,7 +504,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* \brief This class represents a unary operations: ! (bool negation), - (arithmetic negation)
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpUnaryNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpUnaryNode: public jkmpNode {
private:
jkmpNode* child;
char operation;
@ -528,7 +528,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* \brief This class represents a variable assignment (a = expression)
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpVariableAssignNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpVariableAssignNode: public jkmpNode {
private:
jkmpNode* child;
std::string variable;
@ -553,7 +553,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* \brief This class represents a number, a string contant or a boolean contant (true/false)
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpConstantNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpConstantNode: public jkmpNode {
private:
jkmpResult data;
public:
@ -572,7 +572,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* \brief This class represents a variable.
* \ingroup jkmpNodes
*/
class JKQTCOMMON_LIB_EXPORT jkmpVariableNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpVariableNode: public jkmpNode {
private:
std::string var;
public:
@ -597,7 +597,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
*
* Functions may have 8 parameters at the most.
*/
class JKQTCOMMON_LIB_EXPORT jkmpFunctionNode: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpFunctionNode: public jkmpNode {
private:
std::string fun;
jkmpNode** child;
@ -626,7 +626,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
*
* when evaluating the result will be the result of the last node in the list.
*/
class JKQTCOMMON_LIB_EXPORT jkmpNodeList: public jkmpNode {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpNodeList: public jkmpNode {
private:
std::vector<jkmpNode*> list;
public:
@ -665,7 +665,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPMathParser
* error handler and assign it (function pointer) to the global variable jkmathparser_exception_function.
* If this is not nullptr this function will be called instead of throwing an exception.
*/
class JKQTCOMMON_LIB_EXPORT jkmpException : public std::exception {
class JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT jkmpException : public std::exception {
private:
/** \brief the error message */
std::string errormessage;

View File

@ -34,9 +34,9 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon/jkqtplinalgtools.h"
#include "jkqtcommon/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtplinalgtools.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
@ -1019,7 +1019,7 @@ inline void jkqtpstat5NumberStatisticsAndOutliers(InputIt first, InputIt last, O
\ingroup jkqtptools_math_statistics_basic
\see https://en.wikipedia.org/wiki/Five-number_summary, jkqtpstat5NumberStatistics()
*/
struct JKQTCOMMON_LIB_EXPORT JKQTPStat5NumberStatistics {
struct JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT JKQTPStat5NumberStatistics {
JKQTPStat5NumberStatistics();
/** \brief minimum value */

View File

@ -19,7 +19,7 @@
#include "jkqtpstatgrouped.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatgrouped.h"
double jkqtpstatGroupingIdentity1D(double v) {
return v;

View File

@ -34,11 +34,11 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon/jkqtplinalgtools.h"
#include "jkqtcommon/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtplinalgtools.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#include "jkqtcommon/jkqtpstatbasics.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatbasics.h"
/*! \brief a functor \f$ f(x): \mathbb{R}\rightarrow\mathbb{R} \f$ which assignes a value \f$ x \f$ to a group center \f$ f(x) \f$
\ingroup jkqtptools_math_statistics_grouped
@ -60,13 +60,13 @@ typedef std::function<double(double)> JKQTPStatGroupDefinitionFunctor1D;
\see JKQTPStatGroupDefinitionFunctor1D
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingIdentity1D(double v);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatGroupingIdentity1D(double v);
/*! \brief use a rounded column value as group ID directly \f$ f(x)=\mbox{round}(x) \f$
\ingroup jkqtptools_math_statistics_grouped
\see JKQTPStatGroupDefinitionFunctor1D
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingRound1D(double v);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatGroupingRound1D(double v);
/*! \brief assign each value to groups \f$ \mbox{firstGroupCenter} \f$ , \f$ \mbox{firstGroupCenter}\pm\mbox{groupWidth}/2\f$ , \f$ \mbox{firstGroupCenter}\pm2\cdot\mbox{groupWidth}/2 \f$ , \f$ \mbox{firstGroupCenter}\pm3\cdot\mbox{groupWidth}/2 \f$ , ...
\ingroup jkqtptools_math_statistics_grouped
@ -74,7 +74,7 @@ JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingRound1D(double v);
\see JKQTPStatGroupDefinitionFunctor1D, jkqtpstatMakeGroupingCustomRound1D() for a factory-function that returns a functor of this function bound to specific arguments.
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingCustomRound1D(double v, double firstGroupCenter, double groupWidth);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatGroupingCustomRound1D(double v, double firstGroupCenter, double groupWidth);
/*! \brief generates a functor of jkqtpstatGroupingCustomRound1D() with the two paramaters \a firstGroupCenter and \a groupWidth fixed to the given values
\ingroup jkqtptools_math_statistics_grouped
@ -82,7 +82,7 @@ JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingCustomRound1D(double v, double fir
\see JKQTPStatGroupDefinitionFunctor1D, jkqtpstatGroupingCustomRound1D()
*/
JKQTCOMMON_LIB_EXPORT JKQTPStatGroupDefinitionFunctor1D jkqtpstatMakeGroupingCustomRound1D(double firstGroupCenter, double groupWidth);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT JKQTPStatGroupDefinitionFunctor1D jkqtpstatMakeGroupingCustomRound1D(double firstGroupCenter, double groupWidth);

View File

@ -34,11 +34,11 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon/jkqtplinalgtools.h"
#include "jkqtcommon/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtplinalgtools.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#include "jkqtcommon/jkqtpstatbasics.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatbasics.h"

View File

@ -22,12 +22,12 @@
#define JKQTPSTATISTICSTOOLS_H_INCLUDED
#include "jkqtcommon/jkqtpstatbasics.h"
#include "jkqtcommon/jkqtpstathistogram.h"
#include "jkqtcommon/jkqtpstatkde.h"
#include "jkqtcommon/jkqtpstatpoly.h"
#include "jkqtcommon/jkqtpstatregression.h"
#include "jkqtcommon/jkqtpstatgrouped.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatbasics.h"
#include "jkqtcommon_statistics_and_math/jkqtpstathistogram.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatkde.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatpoly.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatregression.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatgrouped.h"
#endif // JKQTPSTATISTICSTOOLS_H_INCLUDED

View File

@ -19,7 +19,7 @@
#include "jkqtpstatkde.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatkde.h"
double jkqtpstatKernel1DGaussian(double t) {

View File

@ -34,11 +34,11 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon/jkqtplinalgtools.h"
#include "jkqtcommon/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtplinalgtools.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#include "jkqtcommon/jkqtpstatbasics.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatbasics.h"
@ -49,64 +49,64 @@
\f[ k(t):=\frac{1}{\sqrt{2\pi}}\exp \left(-\frac{1}{2}t^2\right) \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DGaussian(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DGaussian(double t);
/*! \brief a 1D Cauchy kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t):=\frac{1}{\pi(1+t^2)} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DCauchy(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DCauchy(double t);
/*! \brief a 1D Picard kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t):=\frac{1}{2}\exp(-|t|) \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DPicard(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DPicard(double t);
/*! \brief a 1D Epanechnikov kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t) :=\begin{cases}\frac{3}{4} ( 1- t^2 ), & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DEpanechnikov(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DEpanechnikov(double t);
/*! \brief a 1D uniform kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t) :=\begin{cases}0.5, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DUniform(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DUniform(double t);
/*! \brief a 1D Epanechnikov kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t) :=\begin{cases}1-|t|, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DTriangle(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DTriangle(double t);
/*! \brief a 1D quartic kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t) :=\begin{cases}\frac{15}{16}(1-t^2)^2, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DQuartic(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DQuartic(double t);
/*! \brief a 1D triweight kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t) :=\begin{cases}\frac{35}{32}(1-t^2)^3, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DTriweight(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DTriweight(double t);
/*! \brief a 1D tricube kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t) :=\begin{cases}\frac{70}{81}(1-|t|^3)^3, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DTricube(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DTricube(double t);
/*! \brief a 1D cosine kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_1dkde_kernels
\f[ k(t) :=\begin{cases}\frac{\pi}{4}\cos\left(\frac{\pi}{2}t\right), & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DCosine(double t);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel1DCosine(double t);
@ -125,14 +125,14 @@ JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DCosine(double t);
\f[ k(t_x, t_y):=\frac{1}{2\pi}\exp \left(-\frac{t_x^2+t_y^2}{2}\right) \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel2DGaussian(double tx, double ty);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel2DGaussian(double tx, double ty);
/*! \brief a 1D Gaussian kernel function, e.g. for Kernel Density Estimation
\ingroup jkqtptools_math_statistics_2dkde_kernels
\f[ k(t_x, t_y):=\begin{cases}\frac{1}{4}, & \text{if }t_x,t_y\in [-1;1]\\0, & \text{else}\end{cases} \f]
*/
JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel2DUniform(double tx, double ty);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT double jkqtpstatKernel2DUniform(double tx, double ty);

View File

@ -34,9 +34,9 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon/jkqtplinalgtools.h"
#include "jkqtcommon/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtplinalgtools.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"

View File

@ -34,12 +34,12 @@
#include <ostream>
#include <iomanip>
#include <sstream>
#include "jkqtcommon/jkqtcommon_imexport.h"
#include "jkqtcommon/jkqtplinalgtools.h"
#include "jkqtcommon/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtcommon_statistics_and_math_imexport.h"
#include "jkqtcommon_statistics_and_math/jkqtplinalgtools.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#include "jkqtcommon/jkqtpstatbasics.h"
#include "jkqtcommon/jkqtpstatpoly.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatbasics.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatpoly.h"
@ -278,37 +278,37 @@ enum class JKQTPStatRegressionModelType {
/*! \brief Generates functors \c f(x,a,b) for the models from JKQTPStatRegressionModelType in \a type
\ingroup jkqtptools_math_statistics_regression
*/
JKQTCOMMON_LIB_EXPORT std::function<double(double, double, double)> jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT std::function<double(double, double, double)> jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type);
/*! \brief Generates a LaTeX string for the models from JKQTPStatRegressionModelType in \a type
\ingroup jkqtptools_math_statistics_regression
*/
JKQTCOMMON_LIB_EXPORT QString jkqtpstatRegressionModel2Latex(JKQTPStatRegressionModelType type, double a, double b);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT QString jkqtpstatRegressionModel2Latex(JKQTPStatRegressionModelType type, double a, double b);
/*! \brief Generates functors \c f(x) for the models from JKQTPStatRegressionModelType in \a type and binds the parameter values \a and \a b to the returned function
\ingroup jkqtptools_math_statistics_regression
*/
JKQTCOMMON_LIB_EXPORT std::function<double(double)> jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type, double a, double b);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT std::function<double(double)> jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type, double a, double b);
/*! \brief Generates the transformation function for x-data (\c result.first ) and y-data (\c result.second ) for each regression model in JKQTPStatRegressionModelType in \a type
\ingroup jkqtptools_math_statistics_regression
\internal
*/
JKQTCOMMON_LIB_EXPORT std::pair<std::function<double(double)>,std::function<double(double)> > jkqtpStatGenerateTransformation(JKQTPStatRegressionModelType type);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT std::pair<std::function<double(double)>,std::function<double(double)> > jkqtpStatGenerateTransformation(JKQTPStatRegressionModelType type);
/*! \brief Generates the transformation function for a-parameter (offset, \c result.first : transform, \c result.second : back-transform) for each regression model in JKQTPStatRegressionModelType in \a type
\ingroup jkqtptools_math_statistics_regression
\internal
*/
JKQTCOMMON_LIB_EXPORT std::pair<std::function<double(double)>,std::function<double(double)> > jkqtpStatGenerateParameterATransformation(JKQTPStatRegressionModelType type);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT std::pair<std::function<double(double)>,std::function<double(double)> > jkqtpStatGenerateParameterATransformation(JKQTPStatRegressionModelType type);
/*! \brief Generates the transformation function for b-parameter (slope, \c result.first : transform, \c result.second : back-transform) for each regression model in JKQTPStatRegressionModelType in \a type
\ingroup jkqtptools_math_statistics_regression
\internal
*/
JKQTCOMMON_LIB_EXPORT std::pair<std::function<double(double)>,std::function<double(double)> > jkqtpStatGenerateParameterBTransformation(JKQTPStatRegressionModelType type);
JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT std::pair<std::function<double(double)>,std::function<double(double)> > jkqtpStatGenerateParameterBTransformation(JKQTPStatRegressionModelType type);
/*! \brief calculate the linear regression coefficients for a given data range \a firstX / \a firstY ... \a lastX / \a lastY where the model is defined by \a type

View File

@ -0,0 +1,55 @@
/* THIS IS a PRECOMILED HEADER-File for JKQTCommon-Lib
* it is not intended for external use!
*/
#ifndef jkqtcommon_statistics_and_math_precomp_H
#define jkqtcommon_statistics_and_math_precomp_H
/*
Copyright (c) 2008-2022 Jan W. Krieger (<jan@jkrieger.de>)
This software is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License (LGPL) as published by
the Free Software Foundation, either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License (LGPL) for more details.
You should have received a copy of the GNU Lesser General Public License (LGPL)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _USE_MATH_DEFINES
#include <QtGlobal>
#include <cfloat>
#include <chrono>
#include <cmath>
#include <forward_list>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <sstream>
#include <sstream>
#include <stdexcept>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
#include "jkqtcommon_statistics_and_math/jkqtplinalgtools.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatbasics.h"
#include "jkqtcommon_statistics_and_math/jkqtparraytools.h"
#include "jkqtcommon_statistics_and_math/jkqtpalgorithms.h"
#include "jkqtcommon/jkqtpmathtools.h"
#include "jkqtcommon/jkqtpstringtools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#endif // jkqtcommon_statistics_and_math_precomp_H

View File

@ -237,7 +237,7 @@ if(JKQtPlotter_BUILD_SHARED_LIBS)
)
JKQtPlottter_setDefaultLibOptions(${libsh_name})
set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}")
target_link_libraries(${libsh_name} PUBLIC JKQTCommonSharedLib JKQTMathTextSharedLib)
target_link_libraries(${libsh_name} PUBLIC JKQTCommonSharedLib JKQTCommonStatisticsAndMathSharedLib JKQTMathTextSharedLib)
target_compile_definitions(${libsh_name} PUBLIC JKQTPLOTTER_LIB_IN_DLL)
target_compile_definitions(${libsh_name} PRIVATE JKQTPLOTTER_LIB_EXPORT_LIBRARY)
set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
@ -250,7 +250,7 @@ if(JKQtPlotter_BUILD_STATIC_LIBS)
add_library(${lib_name} STATIC ${SOURCES_BASE} ${SOURCES_GRAPHS} ${SOURCES_GUI} ${RESOURCES} ${HEADERS_BASE} ${HEADERS_GRAPHS} ${HEADERS_GUI})
JKQtPlottter_setDefaultLibOptions(${lib_name})
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}")
target_link_libraries(${lib_name} PUBLIC JKQTCommonLib JKQTMathTextLib)
target_link_libraries(${lib_name} PUBLIC JKQTCommonLib JKQTCommonStatisticsAndMathLib JKQTMathTextLib)
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion )

View File

@ -25,7 +25,7 @@
#include <QPainter>
#include <QPair>
#include "jkqtplotter/jkqtptools.h"
#include "jkqtcommon/jkqtpmathparser.h"
#include "jkqtcommon_statistics_and_math/jkqtpmathparser.h"
#include "jkqtplotter/jkqtplotter_imexport.h"
#include "jkqtplotter/graphs/jkqtpevaluatedfunction.h"

View File

@ -23,7 +23,7 @@
#include "jkqtplotter/jkqtplotter_imexport.h"
#include "jkqtcommon/jkqtpstatisticstools.h"
#include "jkqtcommon_statistics_and_math/jkqtpstatisticstools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#include "jkqtplotter/jkqtpgraphsbase.h"
#include "jkqtplotter/jkqtpgraphsbaseerrors.h"

View File

@ -47,7 +47,7 @@
#include "jkqtcommon/jkqtpstringtools.h"
#include "jkqtcommon/jkqtpdebuggingtools.h"
#include "jkqtcommon/jkqtpmathtools.h"
#include "jkqtcommon/jkqtpalgorithms.h"
#include "jkqtcommon_statistics_and_math/jkqtpalgorithms.h"
#include "jkqtcommon/jkqtpcodestructuring.h"

View File

@ -23,7 +23,9 @@
You should have received a copy of the GNU Lesser General Public License (LGPL)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _USE_MATH_DEFINES
# define _USE_MATH_DEFINES
#endif
#include "jkqtcommon/jkqtpbasicimagetools.h"
#include "jkqtcommon/jkqtpcodestructuring.h"

View File

@ -1,7 +1,7 @@
# uncomment this line to prevent linking in of the XITS fonts
#DEFINES += NO_XITS_FONTS
TARGET = jkqtpcommonlib
CONFIG (debug, debug|release): TARGET = jkqtplotterlib_debug
TARGET = jkqtcommonlib
CONFIG (debug, debug|release): TARGET = jkqtcommonlib_debug
TEMPLATE = lib
CONFIG += dll
@ -12,7 +12,5 @@ win32 {
DEFINES += JKQTCOMMON_LIB_EXPORT_LIBRARY
}
include(../../../lib/jkqtpcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -0,0 +1,18 @@
# uncomment this line to prevent linking in of the XITS fonts
#DEFINES += NO_XITS_FONTS
TARGET = jkqtcommonstatisticsandmathlib
CONFIG (debug, debug|release): TARGET = jkqtcommonstatisticsandmathlib_debug
TEMPLATE = lib
CONFIG += dll
CONFIG += create_prl
win32 {
DEFINES += JKQTCOMMON_STATISTICS_AND_MATH_LIB_IN_DLL
DEFINES += JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT_LIBRARY
}
include(../../../lib/jkqtcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -13,7 +13,7 @@ win32 {
}
include(../../../lib/jkqtfastplotter.pri)
include(../../../lib/jkqtpcommon.pri)
include(../../../lib/jkqtcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -13,7 +13,7 @@ win32 {
}
include(../../../lib/jkqtmathtext.pri)
include(../../../lib/jkqtpcommon.pri)
include(../../../lib/jkqtcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -16,10 +16,11 @@ win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX
include(../../../lib/jkqtplotter.pri)
include(../../../lib/jkqtpcommon.pri)
include(../../../lib/jkqtcommon.pri)
include(../../../lib/jkqtcommon_statistics_and_math.pri)
include(../../../lib/jkqtmathtext.pri)
include(../../../lib/jkqtfastplotter.pri)
include(../../../lib/jkqtplotter.pri)
include(../../../lib/jkqtplotter_pch.pri)

View File

@ -1,13 +1,11 @@
# uncomment this line to prevent linking in of the XITS fonts
#DEFINES += NO_XITS_FONTS
TARGET = jkqtpcommonlib
CONFIG (debug, debug|release): TARGET = jkqtmathtextlib_debug
TARGET = jkqtcommonlib
CONFIG (debug, debug|release): TARGET = jkqtcommonlib_debug
TEMPLATE = lib
CONFIG += staticlib
CONFIG += create_prl
include(../../../lib/jkqtpcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -0,0 +1,13 @@
# uncomment this line to prevent linking in of the XITS fonts
#DEFINES += NO_XITS_FONTS
TARGET = jkqtcommonstatisticsandmathlib
CONFIG (debug, debug|release): TARGET = jkqtcommonstatisticsandmathlib_debug
TEMPLATE = lib
CONFIG += staticlib
CONFIG += create_prl
include(../../../lib/jkqtcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -8,7 +8,7 @@ CONFIG+=staticlib
CONFIG += create_prl
include(../../../lib/jkqtfastplotter.pri)
include(../../../lib/jkqtpcommon.pri)
include(../../../lib/jkqtcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -8,7 +8,7 @@ CONFIG += staticlib
CONFIG += create_prl
include(../../../lib/jkqtmathtext.pri)
include(../../../lib/jkqtpcommon.pri)
include(../../../lib/jkqtcommon.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX

View File

@ -9,10 +9,11 @@ CONFIG += create_prl
#DEFINES += JKQTBP_AUTOTIMER
include(../../../lib/jkqtpcommon.pri)
include(../../../lib/jkqtplotter.pri)
include(../../../lib/jkqtcommon.pri)
include(../../../lib/jkqtcommon_statistics_and_math.pri)
include(../../../lib/jkqtmathtext.pri)
include(../../../lib/jkqtfastplotter.pri)
include(../../../lib/jkqtplotter.pri)
win32-msvc*: DEFINES += _USE_MATH_DEFINES
win32-msvc*: DEFINES += NOMINMAX