<Window x:Class="ClosestPair.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ClosestPair"
mc:Ignorable="d"
Title="MainWindow" Height="720" Width="1200">
<StackPanel>
<Grid Height="600">
<Canvas Name="canvas1" Background="Beige" Width="1100" Height="500"/>
</Grid>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<Button Width="100" Content="생성" Click="Button_Click"/>
<TextBlock Width="50"/>
<Button Width="100" Content="찾기" Click="Button_Click_1"/>
<TextBlock Width="50"/>
<Button Width="100" Content="분할정복" Click="Button_Click_2"/>
</StackPanel>
</StackPanel>
</Window>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace ClosestPair
{
class PointPair
{
public Point P1 { get; set; }
public Point P2 { get; set; }
public double Dist { get; set; }
public PointPair(Point p1, Point p2, double dist) // 생성자
{
P1 = p1;
P2 = p2;
Dist = dist;
}
}
}
'Algorithms' 카테고리의 다른 글
A008_Dijkstra (0) | 2021.10.21 |
---|---|
A007_Prim (0) | 2021.10.12 |
A005_SortWithGraph (0) | 2021.09.24 |
A004_hanoi (0) | 2021.09.17 |
A003_fibo (0) | 2021.09.17 |