kstars
KSUtils Class Reference
KStars utility functions. More...
#include <ksutils.h>
Static Public Member Functions | |
static long double | lagrangeInterpolation (const long double x[], const long double v[], int n, long double xval) |
static bool | openDataFile (QFile &file, const QString &filename) |
Detailed Description
KStars utility functions.
- Version:
- 1.0 Static functions for various purposes. The openDataFile() function searches the standard KDE directories for the data filename given as an argument. (it is impossible to instantiate a KSUtils object; just use the static functions).
Definition at line 32 of file ksutils.h.
Member Function Documentation
long double KSUtils::lagrangeInterpolation | ( | const long double | x[], | |
const long double | v[], | |||
int | n, | |||
long double | xval | |||
) | [static] |
Lagrange interpolation using a maximum number of 10 points.
- Parameters:
-
x[] double array with x values v[] double array with y values n number of points to use for interpolation xval value for which we are looking for the y value.
Definition at line 40 of file ksutils.cpp.
Attempt to open the data file named filename, using the QFile object "file".
First look in the standard KDE directories, then look in a local "data" subdirectory. If the data file cannot be found or opened, display a warning messagebox. Open a data file.
- Parameters:
-
&file The QFile object to be opened filename The name of the data file.
- Returns:
- bool Returns true if data file was opened successfully.
a reference to the opened file.
Definition at line 22 of file ksutils.cpp.
The documentation for this class was generated from the following files: