Tools of the Trade: Week 5 Assignment

Go up to the main README file     Go back to the weekly information page

Wahoovian Matrix Transformation Program

(version 1.3, updated 9/30/2020, 12:35pm – added Note in first section on Gradle on Windows)

In this assignment, you’ll create a project in Python, C++ or Java that has a utility function that implements a matrix operation called the Wahoovian Transformation, as defined below. Your project will also contain a main program that demonstrates this function by calling the function on at least two test case inputs and prints out the results to the console.

Your project will include a control file for the build tool we taught you for the language you choose to you (i.e. either Pip/Virtualenv, CMake, or Gradle) that builds the project (as we taught you in the videos and the demo).

Just like the demo program covered in the video, your project will use logging and matrix libraries (the same ones used in the demo, included it the project in the same way as the demo program).

Here are more details.

Note: If using Gradle on Windows, some users have found they need to set the environment variable GRADLE_HOME to the directory where Gradle is installed, and also set JAVA_HOME to the directory where their JDK is installed.

Wahoovian Matrix Transformation

The full impact of the Wahoovian Matrix Transformation in the field of linear algebra and data science has yet to be fully explored by scholars, but its impact in the field of computer science education is gaining increased recognition. (In other words, we just made this operation up for this assignment as a reasonably simple way to make you explore a matrix multiplication library! :grinning:) The operation is defined as follows:

Requirements of the Wahoovian utility function

  1. The function you write to implement this will be named wahoovian(), and it will take one input parameter, a matrix using the appropriate data type defined by your 3rd party matrix library. It will return a matrix object with values as described above.

  2. If the input matrix is not square, the function will return the input matrix unchanged. If the input matrix has zero rows and columns, the the function will return the input matrix unchanged.

  3. The function wahoovian() must be implemented as if it were a utility function or a library that you can use in more than one program. In other words, it should be in its own file and the calling program (and the build tool) must do the appropriate things to use it.

  4. (Added on 9/25) We want you to make use of the matrix library to find the transpose and negate each value. Each library has functionality that lets you do this in a few lines of code, without using loops.

Requirements of the main program (the “driver”")

  1. Your project will have a program file called driver that is the “main” program for your executable application. This program will do what’s needed to set up logging and use the wahoovian library function.

  2. Your program will “exercise” or test your function in a very basic way. For this assignment, it’s sufficient to call the function at least twice, with different inputs, and print information to the console so that you (and we) can see that your function meets the requirements.

Logging requirements for the project

  1. In the function wahoovian(), log “trace” or “info” messages when entering and leaving the function.

  2. In the function wahoovian(), log a “warning” message if the matrix is not square.

  3. In the main program, log “info” messages when the program starts and finishes.

  4. For Python and C++ programs, send logging messages to a file. For Java programs, it’s fine to send logging messages to the console. (Exactly as done in the demo for all cases.)

Version control and submission requirements

  1. Your project should be put under version control with Git. Note: it’s important to use the .gitignore file that we have provided in the demo repo for each language.

  2. Before submitting this assignment, your project must also be uploaded into a public GitHub repository. It must include a brief README.md that explains what your project does. (Keep this brief. We know what it does. You need this in case someone looks at your GitHub repo and wonders what you’ve done here.)

  3. Once your project is done and in the GitHub repo, use Collab to enter the URL of your GitHub repo so the graders can find it, clone it, and see what you’ve done and if it builds.

Policies on Collaboration and Assistance

  1. If you have any problems, do not hesitate to contact the staff! Our goal is for you to learn about these, and not to struggle over problems that we can help you overcome quickly.

  2. You can work with another person in the class under the following conditions: