User Tools

Site Tools


notes:discrete:fall2023:projects:set0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:discrete:fall2023:projects:set0 [2023/11/08 16:10] – [difference] walleynotes:discrete:fall2023:projects:set0 [2023/11/09 04:45] (current) – [member] cfoster8
Line 7: Line 7:
 A member is an element within a set. Each member within a set is unique from each other (no duplicates). A member is an element within a set. Each member within a set is unique from each other (no duplicates).
  
 +There also cannot be more members in the set than there is space in the array. It only has as much memory allocated as the array specifies. To make the set larger you would need to make a new array.
 ====Venn Diagram==== ====Venn Diagram====
  
Line 12: Line 13:
 ====set==== ====set====
  
-A set is a group of unique objects, typically ordered in some way or another. Sets are typically used to test membership of a given value rather than retrieving a specific element.+A set is a group of unique objects, typically ordered in some way or another. Sets are typically used to test membership of a given value rather than retrieving a specific element. Sets (at least for us) will typically be stored in Arrays, however they can be stored in a List. 
 + 
 +For example if you want an occurrence to only happen if a specific value is one of 5 different items, you could compare it against a set. Your code can then branch off whether there is a match or not.
 ====universe==== ====universe====
 A Universe or a Universal set has all components of all sets within it. It is typically written as U. An example: if A{1,2,3} and B{a,b,c} then U{1,2,3,a,b,c}. If you think of a Venn Diagram then a Universal set is the whole Diagram.  A Universe or a Universal set has all components of all sets within it. It is typically written as U. An example: if A{1,2,3} and B{a,b,c} then U{1,2,3,a,b,c}. If you think of a Venn Diagram then a Universal set is the whole Diagram. 
notes/discrete/fall2023/projects/set0.1699459858.txt.gz · Last modified: 2023/11/08 16:10 by walley