예제 #1
0
파일: PivotMDS.cpp 프로젝트: marvin2k/ogdf
void PivotMDS::copySPSS(Array<double>& copyTo, NodeArray<double>& copyFrom)
{
	const Graph &G = *copyFrom.graphOf();

	int i = 0;
	for (node v : G.nodes) {
		copyTo[i++] = copyFrom[v];
	}
}
예제 #2
0
void StressMinimization::replaceInfinityDistances(
	NodeArray<NodeArray<double> >& shortestPathMatrix,
	double newVal)
{
	const Graph &G = *shortestPathMatrix.graphOf();

	for(node v : G.nodes) {
		for(node w : G.nodes) {
			if (v != w && isinf(shortestPathMatrix[v][w])) {
				shortestPathMatrix[v][w] = newVal;
			}
		}
	}
}