https://github.com/ialhashim/topo-blend
Revision 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC, committed by ennetws on 13 March 2015, 18:17:18 UTC
1 parent c702819
Raw File
Tip revision: 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC
Create README.md
Tip revision: 39b1361
GroupRelationDetector.h
#pragma once
#include "RelationDetector.h"

class GroupRelationDetector :
	public RelationDetector
{
public:
	GroupRelationDetector(Structure::Graph* g, int ith, double normalizeCoef, int logLevel): RelationDetector(g, "GroupRelationDetector-", ith, normalizeCoef, 1, logLevel)
	{
		if ( this->logLevel_ > 0)
		{
			logStream_ << "Threshold for axis group: " << thAxisGroup_ << "\n";
			logStream_ << "Threshold for ref group: " << thRefGroup_ << "\n";
			logStream_ << "Normalization coefficient: " << normalizeCoef_ << "\n";
		}
	}
    QVector<GroupRelation> groupRelations_;	

    void detect(QVector<PairRelation>& prRelations);
protected:
	void detectRefSymmGroupByTransPair(QVector<PairRelation>& prRelations);
	void detectSymmGroupByRefPair(QVector<PairRelation>& prRelations);
    bool isIntersected(QSet<QString>& ids, PairRelation& pr2);
    void removeRedundantGroup();
	// is ids2 is a subgroup of ids1.
    bool isSubgroup(QVector<QString>& ids1, QVector<QString>& ids2);
    QString symmTypeOfTansPair(PairRelation& pr1);

};

back to top