using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace GraphDrawer
{
    /// <summary>
    /// Interaction logic for AdjacencyMatrix.xaml
    /// </summary>
    public partial class AdjacencyMatrix : Window
    {
        public AdjacencyMatrix()
        {
            InitializeComponent();
        }

        public AdjacencyMatrix(int[,] matrix, bool state)
        {
            InitializeComponent();
            var length = (int)Math.Sqrt(matrix.Length);
            for(int i = 0; i < length; i++)
            {
                for(int j = 0; j < length; j++)
                {
                    AdjacencyTextBox.Text += matrix[i, j] + ",";
                }
                AdjacencyTextBox.Text += "\n";
            }
            if (state)
                this.Title = "Матрица инцидентности";
            else
                this.Title = "Матрица смежности";
        }
    }
}
