Mercurial > hg > Database > jungle-sharp
changeset 2:a3af05a061b4
fix , but not work.
author | Kazuma |
---|---|
date | Fri, 01 Jul 2016 19:28:57 +0900 |
parents | 5c58219da97e |
children | 224f0f8b4f40 |
files | src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/list/DefaultNode.cs src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/treemap/TreeMapNode.cs src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/transaction/DefaultTransactionManager.cs src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapDelete.cs src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapTest.cs |
diffstat | 5 files changed, 13 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/list/DefaultNode.cs Fri Jul 01 11:41:41 2016 +0900 +++ b/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/list/DefaultNode.cs Fri Jul 01 19:28:57 2016 +0900 @@ -5,8 +5,7 @@ public class DefaultNode<T> : Node<T> { private T attribute; private Node<T> next; - private Node<T> attribute1; - private TailNode<T> tailNode; + //private TailNode<T> tailNode; private T attribute2; private Node<T> next1; @@ -15,11 +14,11 @@ this.next = next; } - public DefaultNode(Node<T> attribute1, TailNode<T> tailNode) - { - this.attribute1 = attribute1; - this.tailNode = tailNode; - } +// public DefaultNode(Node<T> attribute1, TailNode<T> tailNode) +// { +// this.attribute1 = attribute1; +// this.tailNode = tailNode; +// } public Node<T> getNext() {
--- a/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/treemap/TreeMapNode.cs Fri Jul 01 11:41:41 2016 +0900 +++ b/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/treemap/TreeMapNode.cs Fri Jul 01 19:28:57 2016 +0900 @@ -7,8 +7,8 @@ public abstract class TreeMapNode<K,V> { - public K key = default(K); - public V value = default(V); + protected K key = default(K); + protected V value = default(V); public TreeMapNode<K,V> right; public TreeMapNode<K,V> left; @@ -42,8 +42,8 @@ public V get (K key, Comparer<K> ctr) { TreeMapNode<K,V> cur = this; - int result = cur.compare (key, ctr); - while (cur.isNotEmpty ()) { + while (cur.isNotEmpty ()) { // getでEmpty nodeを返している ? compareでKeyが0になっている + int result = cur.compare (key, ctr); if (result > 0) { cur = cur.rights (); } else if (result < 0) { @@ -54,7 +54,7 @@ } } } - return default(V); // Optional<V>.ofNullable (null); + return default(V); }
--- a/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/transaction/DefaultTransactionManager.cs Fri Jul 01 11:41:41 2016 +0900 +++ b/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/transaction/DefaultTransactionManager.cs Fri Jul 01 19:28:57 2016 +0900 @@ -54,9 +54,6 @@ string treeName; string uuid; - TreeOperation[] _array; - TreeOperation Count; - IEnumerator IEnumerable.GetEnumerator() { @@ -66,8 +63,7 @@ public IEnumerator<TreeOperation> GetEnumerator() { - for (int i = 0; i < Convert.ToInt32(Count); i++) - yield return _array[i]; + return iterator (); }
--- a/src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapDelete.cs Fri Jul 01 11:41:41 2016 +0900 +++ b/src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapDelete.cs Fri Jul 01 19:28:57 2016 +0900 @@ -10,7 +10,7 @@ Debug.Log (count); map = map.put (count, count); int val = map.get(count); - Debug.Log ("value : " + val); + //Debug.Log ("value : " + val); map.checkDepth (); }
--- a/src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapTest.cs Fri Jul 01 11:41:41 2016 +0900 +++ b/src/test/csharp/jp.ac.u-ryukyu.ie.cr/data/treemap/TreeMapTest.cs Fri Jul 01 19:28:57 2016 +0900 @@ -3,7 +3,6 @@ public class TreeMapTest : MonoBehaviour { private int ReturnNumber; - private bool checknull = true; // Update is called once per frame public void Start () { TreeMap<int, int> map = new TreeMap<int,int>();