Mercurial > hg > Database > jungle-sharp
comparison src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapDelete.cs @ 0:dec15de2c6ff
first commit
author | Kazuma |
---|---|
date | Tue, 21 Jun 2016 17:11:12 +0900 |
parents | |
children | 5c58219da97e |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dec15de2c6ff |
---|---|
1 using UnityEngine; | |
2 using System.Collections; | |
3 | |
4 public class TreeMapDelete : MonoBehaviour { | |
5 | |
6 // Use this for initialization | |
7 void Start () { | |
8 TreeMap<int,int> map = new TreeMap<int, int> (); | |
9 for (int count = 1; count < 5; count++) { | |
10 map = map.put (count, count); | |
11 map.checkDepth (); | |
12 } | |
13 | |
14 ArrayList list = new ArrayList (); | |
15 for (int i = 1; i < 5; i++) { | |
16 list.Add (i); | |
17 } | |
18 | |
19 for (int i = 1; i < 5; i++) { | |
20 int ran = Random.Range (1, 6); | |
21 object obj = list [i]; | |
22 list [i] = list [ran]; | |
23 list [ran] = obj; | |
24 } | |
25 | |
26 foreach(int num in list){ | |
27 Debug.Log (num); | |
28 map = map.delete(num); | |
29 map.checkDepth(); | |
30 } | |
31 Debug.Log ("end"); | |
32 } | |
33 } |