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
GraphDissimilarity.h
#pragma once

#include "StructureGraph.h"

class GraphDissimilarity
{
public:
	GraphDissimilarity( Structure::Graph * graphInstance );
    void addGraph( Structure::Graph * g );
	void addGraphs( QVector<Structure::Graph*> fromGraphs );

    // Locals
	int N;
	QMap<QString, int> nodeIndex;

	// Input:
    QVector<Structure::Graph*> graphs;
    
	// Eigen decomposition of the normalized Laplacian matrix of input graphs
	QVector< VectorXd > eigenvalues;
	QVector< MatrixXd > eigenvectors;

	// Compute dissimilarity between two graphs of input
	double compute( int g1, int g2 );
	QVector<double> computeDissimilar( int gidx, int startidx = 2 );
	QVector< QPair<double,double> > computeDissimilarPairs( int startidx = 2 );

    // DEBUG:
    void outputResults();
	static Structure::Graph * fromAdjFile(QString filename);
};
back to top