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/mAlg/mAlgPseudo/iPseudo3Info.h

88 lines
1.9 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.

#pragma once
#include "Defines.h"
#include "IxSerDes.h"
#include "mAlgPseudo_global.h"
class zxAlgRegress;
// 在三区拟压力计算过程中涉及的拟合相关的数据载体
class M_ALGPSEUDO_EXPORT iPseudo3Info : public QObject,
virtual public IxSerDes
{
Q_OBJECT
public:
explicit iPseudo3Info();
iPseudo3Info(const iPseudo3Info &other);
~iPseudo3Info();
bool runFit();
bool isFitted();
void clearAlg();
zxAlgRegress* getAlg() { return m_pAlg; }
void makesureAlg(bool bForceReset = true);
double getFitRsBy(double x); //根据x返回y
VecDouble getFitRsBy(VecDouble& x); //根据x返回y
VecPointF getFitRsDefault(bool bScaled = true); //这是返回数据基础之上的拟合结果
iPseudo3Info* clone();
public:
// KrgKro数据拟合前的数据准备调整、归一化等等
static bool prepareKrgKro1(VVecVariant& vvec);
static bool prepareKrgKro2(VVecVariant& vvec);
// Other
static QString getExpr(DataFittingType oType, int nOrder);
protected:
// TODO 由于序列化机制问题,暂未启用
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
private:
// 原始数据转换为拟合需要的数据格式
VVecDouble orgFitSrcData();
public slots:
signals:
public:
// TODO 由于序列化机制问题,如果增减变量,请注意
// bool iPseu3Wrapper::thisToBa(QByteArray& ba)中的变化
QString m_sPara;
VVecVariant m_vvecSrcData;
DataFittingType m_oFitType;
int m_nFitOrder;
QString m_sExpr;
// QMap<QString, QVariant> m_mapOthers;
protected:
zxAlgRegress* m_pAlg;
};
// 辅助类,比如清空
class M_ALGPSEUDO_EXPORT iPseudo3InfoHelper : public QObject
{
Q_OBJECT
public:
iPseudo3InfoHelper(){}
// 清理map
static void clearMapInfos(QMap<QString, iPseudo3Info*>& map);
};