comparison src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapDelete.cs @ 7:02b2ab7bffe6

fix
author Kazuma
date Tue, 27 Sep 2016 18:36:05 +0900
parents 79da77797f7e
children
comparison
equal deleted inserted replaced
5:0428c8888abf 7:02b2ab7bffe6
1 using UnityEngine; 1 using UnityEngine;
2 using System.Collections;
3 2
4 public class TreeMapDelete : MonoBehaviour { 3 public class TreeMapDelete : MonoBehaviour {
5 4
6 // Use this for initialization 5 // Use this for initialization
7 void Start () { 6 void Start () {
8 TreeMap<int,int> map = new TreeMap<int, int> (); 7 TreeMap<int,int> map = new TreeMap<int, int> ();
9 for (int count = 1; count < 6; count++) { 8 for (int count = 1; count < 6; count++) {
10 Debug.Log (count);
11 map = map.put (count, count); 9 map = map.put (count, count);
12 int val = map.get(count);
13 //Debug.Log ("value : " + val);
14 map.checkDepth (); 10 map.checkDepth ();
15 } 11 }
16 12
17 // ただ消すための数字をここに入れているだけ 13 // ただ消すための数字をここに入れているだけ
18 List<int> list = new List<int>(5); 14 List<int> list = new List<int>();
19 for (int i = 1; i < 5; i++) { 15 for (int count = 1; count < 6; count++) {
20 list.addLast (i); 16 list = list.addLast (count);
21 } 17 }
22 18
23 foreach(int num in list){ 19 foreach(int num in list){
20 Debug.Log(num);
24 map = map.delete(num); 21 map = map.delete(num);
25 map.checkDepth(); 22 map.checkDepth();
26 } 23 }
27 Debug.Log ("end"); 24 Debug.Log ("end");
28 } 25 }