コード例 #1
0
ファイル: LGraph.cpp プロジェクト: MIPT-ILab/ICDV
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
}
コード例 #2
0
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;
}
コード例 #3
0
void COrderManageDlg::OnOrderChange(DWORD dwChangeMask)
{
	if ((dwChangeMask|ORDER_CHANGE_MASK_ORDER) == 0)
	{
		return;
	}

	//重新初始化单子
	InitOrder();
}
コード例 #4
0
void COrderManageDlg::InitLogicControlObject()
{
	//初始化下庄
	InitCustomer();

	//初始化单子
	InitOrder();

	//初始化下注日志
	InitBuyLog();

	//初始化分组
	InitGroupBuy();
}
コード例 #5
0
void COrderManageDlg::OnCustomerItemChange()
{
	//重新初始化单子
	InitOrder();
}