Ejemplo n.º 1
0
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];
	}
}
Ejemplo n.º 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;
			}
		}
	}
}