Пример #1
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;
            CurrentNotation  = new HtmlAdjacencyMatrixNotation();

            TaskText  = "8 вариант\nНайти количество дуг, инцидентных вершине графа G1 * G2, номер которой вводится с клавиатуры.";
            G1_Name   = "G1";
            G1_Points = 4;
            G1_Edges  = 7;

            G2_Name   = "G2";
            G2_Points = 4;
            G2_Edges  = 7;


            GraphG1   = GraphUtils.GenerateRandomDirectedGraph(G1_Name, G1_Points, G1_Edges);
            GraphG2   = GraphUtils.GenerateRandomDirectedGraph(G2_Name, G2_Points, G2_Edges);
            GraphGOut = GraphUtils.DirectedGraphIntersection(GraphG1, GraphG2);

            ListPointsGrapchOut = new ObservableCollection <DiscreteMaC_Lib.Graphes.Points.Point>(GraphGOut.PointCollection);

            HtmlDataG1   = CurrentNotation.ConvertFromGrapch(GraphG1);
            HtmlDataG2   = CurrentNotation.ConvertFromGrapch(GraphG2);
            HtmlDataGOut = CurrentNotation.ConvertFromGrapch(GraphGOut);
        }
Пример #2
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;

            GAjacM_Name   = "G1";
            GAjacM_Points = 6;

            GraphGAjacM = GraphUtils.GenerateRandomDirectedGraph(GAjacM_Name, GAjacM_Points);

            AjacMNotation  = new HtmlAdjacencyMatrixNotation();
            HtmlDataGAjacM = AjacMNotation.ConvertFromGrapch(GraphGAjacM);

            IncidMNotation  = new HtmlIncidenceMatrixNotation();
            HtmlDataGIncidM = IncidMNotation.ConvertFromGrapch(GraphGAjacM);

            TaskAnswer = GraphUtils.GenerateGraphDescription(GraphGAjacM);
        }
Пример #3
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;

            TaskText = "8 вариант\nПо матрице смежности построить матрицу инцидентности и по матрице инцидентности найти вершину графа, имеющую максимальную полустепень исхода.";

            GAjacM_Name   = "G1";
            GAjacM_Points = 4;
            GAjacM_Edges  = 7;

            GraphGAjacM = GraphUtils.GenerateRandomDirectedGraph(GAjacM_Name, GAjacM_Points, GAjacM_Edges);

            AjacMNotation  = new HtmlAdjacencyMatrixNotation();
            HtmlDataGAjacM = AjacMNotation.ConvertFromGrapch(GraphGAjacM);

            IncidMNotation  = new HtmlIncidenceMatrixNotation();
            HtmlDataGIncidM = IncidMNotation.ConvertFromGrapch(GraphGAjacM);

            TaskAnswer = new ObservableCollection <KeyValuePair <DiscreteMaC_Lib.Graphes.Points.Point, int> >(GraphUtils.GetPointsWithMaxOutDegree(GraphGAjacM));
        }