gmorph.h
来自「一个由Mike Gashler完成的机器学习方面的includes neural」· C头文件 代码 · 共 62 行
H
62 行
/* Copyright (C) 2006, Mike Gashler This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see http://www.gnu.org/copyleft/lesser.html*/#ifndef __GMORPH_H__#define __GMORPH_H__class GArffRelation;class GArffData;class GGraphCut;class GIntArray;class GMorph{protected: GArffRelation* m_pRelation; GArffData* m_pData1; GArffData* m_pData2; GArffData* m_pCorrespondence; double m_dSquaredRatio; double* m_pEdgeMask; double* m_pInputDelta; // When dOutputToInputRatio is 0, it just does linear interpolation of the output values. When // dOutputToInputRatio is very large, it does linear interpolation of the input values. When // dOutputToInputRatio is 1, it weights inputs and outputs equally. GMorph(GArffRelation* pRelation, GArffData* pData1, GArffData* pData2, double dOutputToInputRatio);public: ~GMorph(); // Produce a set of points that correspond between the two data sets. // Each point p is encoded such that p = i * m_pData2->GetSize() + j, // where i is the index in m_pData1 and j is the index in m_pData2. // So i = p / m_pData2->GetSize(), and j = p % m_pData2->GetSize(). static void GetCorrespondingPoints(GArffRelation* pRelation, GArffData* pData1, GArffData* pData2, double dOutputToInputRatio, GIntArray* pPoints);protected: // Returns true iff the dot product of (pTarget - pOrigin) with // m_pEdgeMask is > 0. (This effectively gives a direction to // every edge. We can use this direction to make sure we only put // the edge in the graph once, and to determine which node is // responsible for the edge's capacity value.) bool CheckEdge(double* pOrigin, double* pTarget); void MakeGraph(GGraphCut* pGraph, int nSource); void GatherPathPoints(GGraphCut* pGraph, GIntArray* pPoints); void FindCorrespondence(GIntArray* pPoints);};#endif // __GMORPH_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?