commit ad7f49e9f06427fab43486cb9c053eeb4b386682
parent c93abd2e46ffc7d5c55eb9360bc0baef0714902f
Author: Andrew <andrewlaack1@gmail.com>
Date: Tue, 9 Apr 2024 15:41:37 -0500
Finished most of my notes for the day. A few more to come later
Diffstat:
16 files changed, 207 insertions(+), 3 deletions(-)
diff --git a/CS202.md b/CS202.md
@@ -0,0 +1,8 @@
+# CS 202
+
+This is the index for my cs 202 notes.
+
+## Main Links
+
+[[LinkedLists.md]]
+[[MemoryManagement.md]]
diff --git a/CS331.md b/CS331.md
@@ -0,0 +1,7 @@
+# CS 331
+
+This is the index for my CS 331 notes.
+
+# Main Links
+
+[[Unity]]
diff --git a/DoublyLinkedList.md b/DoublyLinkedList.md
@@ -0,0 +1,8 @@
+# Doubly Linked List
+
+CS 221 W 11 Lecture 13
+
+## Notes
+
+**Definition:** This is a linked list that has a pointer to the tail and head that are accessible, and every element in the list has a pointer to the previous and next nodes.
+
diff --git a/FibonacciNumbers.md b/FibonacciNumbers.md
@@ -2,7 +2,7 @@
Abstract Math 10.5.
-## Notes:
+## Notes
**Definition:** The set of numbers in the form $F_n = F_{n-1} + F_{n-2}$ starting from 1 as the first value.
diff --git a/FundamentalTheoremOfArithmetic.md b/FundamentalTheoremOfArithmetic.md
@@ -2,7 +2,7 @@
Abstract Math 10.4. Can be proven through [[StrongInduction.md]]
-## Notes:
+## Notes
**Definition:** Any integer greater than 1 has a unique prime factorization.
diff --git a/Index.md b/Index.md
@@ -0,0 +1,13 @@
+# Index
+
+This is the index for my main note classifications. I will maintain this as a home page.
+
+## School
+
+[[CS202.md]]
+[[CS331.md]]
+[[Math310.md]]
+
+## Other
+
+N/A
diff --git a/Induction.md b/Induction.md
@@ -26,4 +26,6 @@ If the set of numbers is bidirectional like $\Z$, then we need to prove that bot
When using induction the common form is $S_k \implies S_{k+1}$, but it is equally valid to prove that $S_{k-1} \implies S_k$ if that is easier to show.
+When proving induction it is important to first state what the value of k+1 equates to. We then need to go from there to equate it to the other side of the statement. We should not assign the left and right together from the start because there would be nowhere to go from there instead do algebra to prove the statement is true.
+
[[StrongInduction.md]] Is another type of induction.
diff --git a/LinkedLists.md b/LinkedLists.md
@@ -0,0 +1,14 @@
+# Linked Lists
+
+This is from CS 221 W11 Lecture 13
+
+## Notes
+
+**Definition:** A linked list is a list of items that are linked together using pointers. As such they are not in contiguous memory.
+
+Inserting into and removing from linked lists is faster than arrays when resizing / defragmenting are at play.
+
+## Types
+
+[[SinglyLinkedList.md]]
+[[DoublyLinkedList.md]]
diff --git a/Math310.md b/Math310.md
@@ -0,0 +1,7 @@
+# Math 310
+
+This is the index for my main Math 310 notes.
+
+# Main Links
+
+[[Induction]]
diff --git a/MemoryManagement.md b/MemoryManagement.md
@@ -0,0 +1,44 @@
+# Memory Management
+
+Memory management CS 202 ~W10 C++
+
+## Notes
+
+Memory management in C++ is done using a few keywords shown below
+
+**delete:** The delete keyword deallocates the memory associated with an object on the heap.
+
+**new:** The new keyword specifies to create an object on the heap. This will not be deallocated when no longer referenced so it needs to be deleted when the time comes.
+
+\*: The asterisk is used to create a pointer. The pointer will be of a type and can be assigned to a variable.
+
+**&:** The ampersand, known as the address operator, is used to take the address of a variable. An example of this is as follows where we assign a pointer to point to the location of an integer:
+
+```cpp
+
+ int var{3000};
+ int *ptr;
+ ptr = &var;
+
+```
+
+
+**Referencing:** This is done by the & (see above as this is quite simple).
+
+
+**Dereferencing:** This is done by the * character. This gives access to the underlying values. This can be used to both assign the underlying variable(s) and also to assign other things to them. Below is an example:
+
+```cpp
+
+ int x{100};
+ int * ptr = &x;
+ cout << *ptr;
+ //reassigns x to 1000.
+ *ptr = 1000;
+
+ //these print the same value, 1000
+ cout << *ptr;
+ cout << x;
+```
+
+A few cases of memory management in action are [[SinglyLinkedList.md]] and [[DoublyLinkedList.md]] which both require memory management to ensure nodes in the heap are not lost after removing a node from the list.
diff --git a/MeshFilter.md b/MeshFilter.md
@@ -0,0 +1,7 @@
+# Mesh Filter
+
+Unity game engine component [[Unity.md]]
+
+## Notes
+
+The mesh filter sets the shape of an object. Without a renderer, this does nothing, but this gives the general dimensions of the object (not scale though).
diff --git a/MeshRenderer.md b/MeshRenderer.md
@@ -0,0 +1,7 @@
+# Mesh Renderer
+
+Unity component [[Unity.md]]
+
+## Notes
+
+A mesh renderer is the component that assigns a material to an object. This does not have shape just material. The default is the magenta material.
diff --git a/SinglyLinkedList.md b/SinglyLinkedList.md
@@ -0,0 +1,56 @@
+# Singly Linked Lists
+
+CS 221 W11 Lecture 13
+
+## Notes
+
+**Definition:** Singly linked lists are lists that only contain pointers to the next item in the list. This is in contrast with [[DoublyLinkedList.md]] which have a pointer forward and backward.
+
+There is a pointer that needs to point to the head and then finding every subsequent element is as simple as iterating through the list. The final item in the list contains a null pointer.
+
+Additionally, there are no cycles ([[Graphs.md]]) in the list hence that makes them a "tree".
+
+Inserting at the start is done as follows:
+
+1. Create new node on the head (use the new keyword).
+2. Point new node's pointer to the old start.
+3. Point the head pointer (used to reference the list) to the new head
+
+Removing first element (this is more complex in c/c++ because of memory management):
+
+1. Create a pointer that will keep track of the node being removed
+2. Point the head pointer to the next start
+3. Deallocate the node that was removed in step 1.
+
+
+Insert into arbitrary position:
+
+1. Walk the list until reaching the point - 1 (done so insertion for position 3 is at 3 not 4)
+2. Make new node
+3. Create pointer that points to the next node in relation to the current node
+3. Point the pointer on the current node to the newly created node
+4. Point the pointer on the new node to the node that was previously referenced by the last node (tempPointer)
+
+Removing arbitrary element:
+
+1. Walk list until reaching the index -1
+2. Create temp pointer with reference to the node that will be deleted
+3. Point the current node's pointer to the pointer for the node after the deleted one
+4. Deallocate the node marked for deletion
+
+## Efficiency Information:
+
+Worst Case:
+
+Add to end: O(n)
+Remove from end: O(n)
+Traverse to end: O(n)
+
+These are worst case scenarios where you are searching, removing, and adding to the end of the list as it needs to be wholly traversed in such a case.
+
+Best Case:
+
+Add to start: O(1)
+Remove from start: O(1)
+Traverse to first: O(1)
+
diff --git a/SmallestCounterExample.md b/SmallestCounterExample.md
@@ -2,7 +2,7 @@
Abstract Math 10.3. This is similar to [[Induction.md]] and [[StrongInduction.md]]
-## Notes:
+## Notes
**Definition:** Assume that the first element of a series is true and that not all other elements of the series are also true. We find the first element that is untrue denoted as $S_k$ and show that $S_{k-1}$ being true and $S_k$ being untrue is contradictory.
diff --git a/Unity.md b/Unity.md
@@ -0,0 +1,18 @@
+# Unity
+
+Unity is a popular game engine, no duh.
+
+## Notes
+
+### General Stuff
+
+**Unity Hub:** Used to manage projects and create projects. This can also be used to select IDE versions
+
+**Aggregation:** Unity uses aggregation by grouping assets together (nesting)
+
+
+### Links
+
+[[MeshFilter.md]]
+[[MeshRenderer.md]]
+
diff --git a/WellOrdered.md b/WellOrdered.md
@@ -0,0 +1,13 @@
+# Well Ordered
+
+Abstract Math Chapter 10
+
+## Notes
+
+**Definition:** A well order set has a definite smallest element.
+
+This is important because it is the basis for [[Induction.md]] as without it, there would be no way to prove that $S_n\implies S_{n+1}$ means that for something is true for all values in the set.
+
+A few examples of well ordered sets are $\N$, any known subset or provable subset of $\N$, the set {0,2,4,5646}, and infinitely many others.
+
+Some examples of non-well ordered sets include $\R$, $\Z$, and $\mathbb{Q}$