CS 228 meeting -*- Outline -*- * Introduction to Data Structures (HR 4.1) purpose: to give an overview of abstract (client) viewpoint of data structures, sets the stage for looking at the implementation side in later chapters ** data types recall ------------------------ ABSTRACT DATA TYPES def: an *abstract data type* (ADT) is a type specified by: (1) a set of *abstract values*, and (2) specifications for the *operations* on the values ------------------------ HR call the set of abstract values the domain Q: What are some examples? int, Ratl, Account, ... Q: What were the set of abstract values (the domain)? The operations? ** data structures ------------------------- SIMPLE (ATOMIC) DATA TYPES vs. STRUCTURED DATA TYPES def: an ADT is *simple* or *atomic* if it cannot be broken down into parts. examples: int, float, Account def: a *structured data type* is an ADT that can be broken down into parts. examples: Ratl, arrays in C++ ------------------------- we'll resist calling this a data structure, and reserve the term data structure for the representation of a structured data type (unlike HR) Q: what were the set of abstract values (the domain)? The operations? there is often some connection between the parts, this is an (abstract) invariant of a structured ADT (HR write this in the STRUCTURE section) structured ADTs are helpful for solving problems - manipulate whole collection at once ==> higher level - can thus simplify algorithms we'll give examples...