void LGraph::Layout(unsigned int number_of_iterations, bool do_transpose, int transpose_range){ list<pEdge> ReverseEdges; FindReverseEdges(ReverseEdges); ReverseReverseEdges(ReverseEdges); InitRank(); list<pEdge> LongEdges; FindLongEdges(LongEdges); AddDummyNodes(LongEdges); ReverseEdges.clear(); order = new Ordering(); order->order_vector = InitOrder(); // Number of iterations. layouted = true; for (unsigned int i = 0; i < number_of_iterations; i++) { WeightedMedianHeuristic(i); // TODO(Kuzmich(svatoslav1)): make transpose faster. It is too slow for now if (do_transpose) Transpose(i + transpose_range); } InitPos(order); InitCoordinates(order); #ifdef DEBUG printf("Crossings:%d\n",countCrossing(order)); #endif }
int main(int argc, char **argv) { char name[255]; if(argc!=2) { fprintf(stderr, "miss graph source file\n"); return 1; } else { strcpy(name, argv[1]); printf("Processing the file as DIMACS standard format.\n"); } CreateGraph(name); InitOrder(EliminateOrder); ChoosePointAndSwap(EliminateOrder); output(); return 0; }
void COrderManageDlg::OnOrderChange(DWORD dwChangeMask) { if ((dwChangeMask|ORDER_CHANGE_MASK_ORDER) == 0) { return; } //重新初始化单子 InitOrder(); }
void COrderManageDlg::InitLogicControlObject() { //初始化下庄 InitCustomer(); //初始化单子 InitOrder(); //初始化下注日志 InitBuyLog(); //初始化分组 InitGroupBuy(); }
void COrderManageDlg::OnCustomerItemChange() { //重新初始化单子 InitOrder(); }