CSC151 2009F, Class 36: Vectors Admin: * Exam 2 due! * Don't forget to send the electronic copy * Fun event Saturday a.m.: Grinnell Destination ImagiNation Fun Run/Walk. More info outside my office or at the back of the room. * Reading for Friday: Pairs and Pair Structures. * CS Extra Thursday (4:30 p.m. 3821) Jun Ni, Ph.D., Associate Professor Director, Center of Medical Imaging Informatics Department of Radiology, Carver College of Medicine The University of Iowa A talk on the semantic framework for the description and classification of data derived from health records and medical imaging. * Sample solution for Quiz 8 returned. * Assignment 7 is now ready. Overview: * Problems with lists. * A solution: Vectors. * Important vector procedures. Quick summary of reading * Common problem: Gather a group of information together * Dissimilar information to build a coherent whole: drawings * Lots and lots of similar values: colors, drawings, etc. * Programming languages provide mechanisms for gathering information * Lists TWO BIG PROBLEMS WITH LISTS * Some common operations are SLOW * (list-ref lst 200) * Some common operations are SLOW and HARD * "Change element #200 element of this list of colors to RGB-RED The solution: Design another way to organize data! * Vector (called an "array" in most languages) * A way to group data * Gives quick access to *any* element in the collection (by index) * Mutableq * You lose the ability to change the size of a vector.