You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/nmNum/nmCalculation/nmCalculationUtils.h

38 lines
1.6 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef NMCALCULATIONUTILS_H
#define NMCALCULATIONUTILS_H
#include <QString>
#include <QPointF>
#include <QVector>
#include "nmCalculation_global.h"
#include "nmCalculationDefine.h"
#include <iostream>
class NMCALCULATION_EXPORT nmCalculationUtils {
public:
nmCalculationUtils();
static bool copyFileToDir(QString filePath, QString destDir);
static bool createDirectoryIfNotExists(QString directoryPath);
static bool copyFile(const std::string& sourcePath, const std::string& destinationPath);
static bool removeDirectory(const QString &dirPath);
static bool writeFile(const QStringList& content, const QString &filePath);
static QStringList readFile(const QString & filePath);
// 调用求解器Kriging接口对targetPoints中的坐标依次进行属性插值.
// measurementPoints与measurementValues按下标一一对应.
// 成功时outputValues与targetPoints数量相同且顺序一致失败时清空outputValues.
static bool calculateKriging(const QVector<QPointF>& targetPoints,
const QVector<QPointF>& measurementPoints,
const QVector<double>& measurementValues,
double nugget,
double sill,
double range,
int model,
const QString& licensePath,
QVector<double>& outputValues,
QString* errorMessage = 0);
};
#endif // NMCALCULATIONUTILS_H