Skip to content
This repository was archived by the owner on Sep 17, 2022. It is now read-only.

Commit 1f928dc

Browse files
Added Structure Implementation for all DataStructures
- Added Structure Implementation for all DataStructures - Also improved ArrayStructure and Animator performance drastically by reducing space complexity.
1 parent d5762e3 commit 1f928dc

26 files changed

+711
-41
lines changed

Assets/Images/Icon_black_shadow.png.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Images/Icon_black_shadow_roundapi.png.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/ARgorithm/Animations/ArrayAnimator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ public Quaternion rotation
112112
//Array of cubeclass holds the Gameobjects
113113
private Cube[] arrayOfCubes;
114114
private NDimensionalArray body;
115-
private string name;
115+
private string _name;
116116
private GameObject nameGameObject;
117117
public void Declare(string name, NDimensionalArray body, GameObject placeHolder)
118118
{
119119
/*
120120
Sets Array represented by Cubes at placeholder
121121
*/
122-
this.name = name;
122+
this._name = name;
123123
this.body = body;
124124
GameObject array = new GameObject("array");
125125

@@ -143,7 +143,7 @@ private void Array1DDeclare(GameObject array,GameObject placeHolder)
143143
{
144144
List<int> shape = body.Shape;
145145
nameGameObject = Instantiate(Resources.Load("NamePrefab") as GameObject);
146-
nameGameObject.GetComponent<TextMeshPro>().SetText(this.name);
146+
nameGameObject.GetComponent<TextMeshPro>().SetText(this._name);
147147
nameGameObject.transform.SetParent(placeHolder.transform);
148148
nameGameObject.transform.localPosition = Vector3.zero;
149149
nameGameObject.transform.localRotation = new Quaternion(0, 0, 0, 0);
@@ -195,7 +195,7 @@ private void Array2DDeclare(GameObject array, GameObject placeHolder)
195195
{
196196
List<int> shape = body.Shape;
197197
nameGameObject = Instantiate(Resources.Load("NamePrefab") as GameObject);
198-
nameGameObject.GetComponent<TextMeshPro>().SetText(this.name);
198+
nameGameObject.GetComponent<TextMeshPro>().SetText(this._name);
199199
// Handles 2-D arrays
200200
arrayOfCubes = new Cube[shape[0] * shape[1]];
201201
array.transform.SetParent(placeHolder.transform);
@@ -262,7 +262,7 @@ private void Array3DDeclare(GameObject array, GameObject placeHolder)
262262
{
263263
List<int> shape = body.Shape;
264264
nameGameObject = Instantiate(Resources.Load("NamePrefab") as GameObject);
265-
nameGameObject.GetComponent<TextMeshPro>().SetText(this.name);
265+
nameGameObject.GetComponent<TextMeshPro>().SetText(this._name);
266266
// Handles 3-D arrays
267267
arrayOfCubes = new Cube[shape[0] * shape[1] * shape[2]];
268268
array.transform.SetParent(placeHolder.transform, false);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using TMPro;
5+
6+
using ARgorithm.Structure.Typing;
7+
8+
namespace ARgorithm.Animations
9+
{
10+
public class MapAnimator : MonoBehaviour
11+
{
12+
public void Declare(string name, List<ContentType>key, List<ContentType>value, GameObject placeholder)
13+
{
14+
15+
}
16+
17+
public void Get(ContentType key)
18+
{
19+
20+
}
21+
22+
public void Set(ContentType key, ContentType value)
23+
{
24+
25+
}
26+
27+
public void Remove(ContentType key)
28+
{
29+
30+
}
31+
}
32+
}

Assets/Scripts/ARgorithm/Animations/MapAnimator.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using TMPro;
5+
6+
using ARgorithm.Structure.Typing;
7+
8+
namespace ARgorithm.Animations
9+
{
10+
public class PriorityQueueAnimator : MonoBehaviour
11+
{
12+
public void Declare(string name, List<ContentType> body, GameObject placeholder)
13+
{
14+
15+
}
16+
17+
public void Poll()
18+
{
19+
20+
}
21+
22+
public void Offer(ContentType element)
23+
{
24+
25+
}
26+
27+
public void Peek()
28+
{
29+
30+
}
31+
}
32+
}

Assets/Scripts/ARgorithm/Animations/PriorityQueueAnimator.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using TMPro;
5+
6+
using ARgorithm.Structure.Typing;
7+
8+
namespace ARgorithm.Animations
9+
{
10+
public class QueueAnimator : MonoBehaviour
11+
{
12+
public void Declare(string name, List<ContentType> body, GameObject placeholder)
13+
{
14+
15+
}
16+
17+
public void Pop()
18+
{
19+
20+
}
21+
22+
public void Push(ContentType element)
23+
{
24+
25+
}
26+
27+
public void Front()
28+
{
29+
30+
}
31+
32+
public void Back()
33+
{
34+
35+
}
36+
}
37+
}

Assets/Scripts/ARgorithm/Animations/QueueAnimator.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using TMPro;
5+
6+
using ARgorithm.Structure.Typing;
7+
8+
namespace ARgorithm.Animations
9+
{
10+
public class SetAnimator : MonoBehaviour
11+
{
12+
public void Declare(string name, List<ContentType> body, GameObject placeholder)
13+
{
14+
15+
}
16+
17+
public void Add(ContentType key)
18+
{
19+
20+
}
21+
22+
public void Remove(ContentType key)
23+
{
24+
25+
}
26+
27+
public void Find(ContentType key)
28+
{
29+
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)