Beispiel #1
0
void FastMultipoleMultilevelEmbedder::layoutCurrentLevel()
{
	FastMultipoleEmbedder fme;
	fme.setNumberOfThreads(this->m_iMaxNumThreads);
	fme.setRandomize(m_iCurrentLevelNr == (m_iNumLevels-1));
	fme.setNumIterations(numberOfIterationsByLevelNr(m_iCurrentLevelNr));
	fme.call((*m_pCurrentGraph), (*m_pCurrentNodeXPos), (*m_pCurrentNodeYPos), (*m_pCurrentEdgeLength), (*m_pCurrentNodeSize));
}
Beispiel #2
0
void FastMultipoleMultilevelEmbedder::call(GraphAttributes &GA)
{
	EdgeArray<float> edgeLengthAuto(GA.constGraph());
	computeAutoEdgeLength(GA, edgeLengthAuto);
	const Graph& t = GA.constGraph();
	if (t.numberOfNodes() <= 25)
	{
		FastMultipoleEmbedder fme;
		fme.setNumberOfThreads(this->m_iMaxNumThreads);
		fme.setRandomize(true);
		fme.setNumIterations(500);
		fme.call(GA);
		return;
	}

	run(GA, edgeLengthAuto);

	for(edge e : GA.constGraph().edges)
	{
		GA.bends(e).clear();
	}
}