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.
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "IxSerDes.h"
|
|
|
|
|
|
#include "Defines.h"
|
|
|
|
|
|
#include "mAlgPseudo_global.h"
|
|
|
|
|
|
|
|
|
|
|
|
class zxAlgRegress;
|
|
|
|
|
|
|
|
|
|
|
|
// 根据组分计算(源自徐泽轩)
|
|
|
|
|
|
// 在三区拟压力计算过程中涉及的拟合相关的数据载体
|
|
|
|
|
|
class M_ALGPSEUDO_EXPORT iPseudoCInfo : public QObject,
|
|
|
|
|
|
virtual public IxSerDes
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
explicit iPseudoCInfo();
|
|
|
|
|
|
iPseudoCInfo(const iPseudoCInfo &other);
|
|
|
|
|
|
~iPseudoCInfo();
|
|
|
|
|
|
|
|
|
|
|
|
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); //这是返回数据基础之上的拟合结果
|
|
|
|
|
|
|
|
|
|
|
|
iPseudoCInfo* 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 iPseudoCInfoHelper : public QObject
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
iPseudoCInfoHelper(){}
|
|
|
|
|
|
// 清理map
|
|
|
|
|
|
static void clearMapInfos(QMap<QString, iPseudoCInfo*>& map);
|
|
|
|
|
|
|
|
|
|
|
|
};
|