Midterm instructions

Midterm instructions - Midterm Assessment Load a Matrix...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Midterm Assessment Load a Matrix from File Margot Gerritsen Shela Aboud Emmet Caulfield January 29, 2010 1 1 Introduction In this midterm assessment, you are given a partially complete matrix utility library virtually identical to that used for HW4 except that the size of the matrices is more limited — this will help you by allowing you to assume a “maximum possible index”. You may have noticed that matrix.[ch] has an m save() function that allows you to save a matrix to a file. Your task is to add a complementary m load() function that loads a matrix in the same simple format (space-separated ASCII). As before, you will use svn to interact with your personal Subversion repository, used in homeworks 2–4 with the same structure. This is an individual assessment. You may not collaborate or consult with any person other than the instructors and teaching assistants for ENERGY-211/CME-211. You can examine the (beautified) source-code and documentation, generated with Doxygen , for the partially complete library at http://www.stanford. edu/ ~ emmetc/CME-211/MT . 2 Instructions Read this entire document right through closely before you do anything else. 2.1 Directory Structure and Import First, export the content of http://cees-svn.stanford.edu/homeworks/MT/ trunk into an empty temporary directory and import it into your personal repository with the prescribed structure (explained in HW2), just as you did in HW3 and HW4. You can read more about Subversion in the online book, Version Control with Subversion . After these export and import operations, the trunk for your midterm assess- ment should be at http://cees-svn.stanford.edu/ your-sunet-id /MT/trunk — this is what we will collect from cees-svn at the deadline. 2.2 The Task You are given an incomplete matrix utility library, whose implementation (all the function definitions) is in matrix.c and whose interface (all the function declarations) is in matrix.h . It is slightly improved from the version in HW4 , but is essentially similar. This library has, inter alia , a function for saving a matrix to a file with the following prototype: void m save(matrix s *a, char *filename); Your task is to add complementary functionality for loading a matrix from a file, having the following prototype: matrix s *m load(char *filename); Currently, there is a dummy m load() function which always returns a 5 × 5 identity matrix. To make this a little easier, you are given a Makefile and simple driver in test-load.c and a collection of test matrices in data . The test driver takes each file named on its command-line, loads it using m load() (as written by you), and then saves the loaded matrix using m save() with the extension .out . You can use this to test your m load() function using the supplied data....
View Full Document

This note was uploaded on 06/17/2010 for the course CME 211 taught by Professor Staff during the Winter '10 term at Stanford.

Page1 / 9

Midterm instructions - Midterm Assessment Load a Matrix...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online