void sort(int n) // 거리차에 따른 정렬 { for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (rank[i].Gape > rank[j].Gape) { makeDepthRank c = new makeDepthRank(); c = rank[i]; rank[i] = rank[j]; rank[j] = c; } } } }
public MainWindow() { #region m_rect = new Rectangle[col + 1, row + 1]; rank = new makeDepthRank[col * row + 1]; point = new rect_infomaion[col + 1, row + 1]; QueueSize = 90; rect_Shift = new CriticalShell_Shift[QueueSize]; Frame_cnt = 0; rect_cnt = new int[4, 4]; #endregion InitializeComponent(); InitializeNui(); int cnt = 0; #region 초기화 Image_critical.Visibility = Visibility.Collapsed; for (int i = 0; i < QueueSize; i++) { rect_Shift[i] = new CriticalShell_Shift(3, 3); } for (int i = 0; i < col; i++) { for (int j = 0; j < row; j++) { cnt++; m_rect[i, j] = new Rectangle(); m_rect[i, j].StrokeThickness = 5; m_rect[i, j].Visibility = Visibility.Collapsed; Canvas1.Children.Add(m_rect[i, j]); } } #endregion }
public MainWindow() { #region m_rect = new Rectangle[col + 1, row + 1]; rank = new makeDepthRank[col * row + 1]; point = new rect_infomaion[col + 1, row + 1]; QueueSize = 90; rect_Shift = new CriticalShell_Shift[QueueSize]; Frame_cnt = 0; rect_cnt = new int[4, 4]; #endregion InitializeComponent(); InitializeNui(); int cnt = 0; #region 초기화 Image_critical.Visibility = Visibility.Collapsed; for (int i = 0; i < QueueSize; i++) rect_Shift[i] = new CriticalShell_Shift(3, 3); for (int i = 0; i < col; i++) for (int j = 0; j < row; j++) { cnt++; m_rect[i, j] = new Rectangle(); m_rect[i, j].StrokeThickness = 5; m_rect[i, j].Visibility = Visibility.Collapsed; Canvas1.Children.Add(m_rect[i, j]); } #endregion }
void sort(int n) // 거리차에 따른 정렬 { for (int i = 0; i < n; i++) for (int j = i + 1; j < n; j++) if (rank[i].Gape > rank[j].Gape) { makeDepthRank c = new makeDepthRank(); c = rank[i]; rank[i] = rank[j]; rank[j] = c; } }