示例#1
0
/** 
 * Ordering nodes
 * Uses median/barycenter and transpose methods
 */
void AdjRank::doOrder( AdjRank* comp_rank)
{
	for( ListItem< NodeAux>* iter = adj_rank.head(); iter != NULL; iter = iter->next())
	{
		iter->data()->msetX( comp_rank->baryValue( iter->data())/* + iter->data()->width() / 2*/);
	}
	sortByVal();
	setInitX();
};
示例#2
0
void printListInt( List<int>* list)
{
    ListItem<int>* p = list->head();
    while (p != NULL)
    {
        out("%d", *(p->data()));
        p = p->next();
    }
}
示例#3
0
	void ShapeMaker::finish() {
		ListItem<ShapeItem> *last = edges->last ();
		if (last && last->data()->isEnd ()) {
			return;
		}

		// end shape
		ShapeSetup *setup = new ShapeSetup;
		edges->append(setup);
	}