5903 Intro Scientific Prog:
Summer 2009 Assignments
Rules:
- All programs must be submitted electronically as gzipped
archives that unpack into a directory named "Name_HWn" where Name is
your name and n is the number of the assignment.
- The directory must be complete and self contained.
- The program must compile with the gcc compiler using a simple make command. The executable must be named "Name_Hwn".
- The executable must operate according to the program specifications.
- The directory must contain one (or more) "ReadMe" files
explaining usage, any known problems, and how the program was
tested/validated.
- We will discuss submitted programming assignments after the deadline in class. For this reason deadlines will be enforced.
- Each assignment will be 10pts. A non-compiling program or
one that does not run correctly on the test problem is a zero. A
compiling program that runs correctly on test problems is at least
7/10. Of the remaining three points: one is for complying with the
naming and documentation requirements; the remaining two points
are for programming readability and style.
Style:
- Your code NEEDS to behave as it is supposed to.
- No "magic" Numbers.
- Meaningful/reasonable variable names.
- Adequate documentation/comments.
- Thorough testing and validation.
- Reasonable code reuse and compartmentalization.
- This means a clean simple primary file with a clean simple main
- Procedures isolated in meaningful ways in seperate files
- Only header information in header files with thought given to the include tree.
- Header information consists of preprocessor directives, function prototypes and appropriate definitions.
Formats:
- Vectors and Matrices are structures
- struct Vec {int n; float *p;}
- struct Mat {int n; int m; float *p;}
- The file format for a vector and a matrix are
- n\n p[0]\n p[1]\n ... p[n-1]\n/*Comments*/
- n\t m\n p[0]\n p[1]\n ... p[n*m - 1]\n/*Comments*/
- You should be able to substitute new lines for tabs and vice versa in all locations
- No comments in file before the end of the data.
- I will put .vec and .mat as extensions as mnemonics (i.e. memory aids).
- Require: Creator/Destructor/Reader/Writer for both mat and vec
- All should provide some feedback in return.
- Sample vector (small/med) and matrix files (small/med) are provided.
- Assignments: (Due Dates and additional
assignments will appear as we go through the term. Assignments will be
discussed in class)
- Hello World
- Libraries and Makefiles
- Multiple Input Files
- Parsing Input Arguments
- Primes
- More Primes
- Word Count A
- Word Count B
- CORDIC
- Project Plan
- Optimization Functions A
- Conjugate Gradients
- Optimization Functions B
- Grading Exercises
- QR Eigenvalue Algorithm
- Function Pointers
- Project Report
- Project Presentation