Skip to content

WesleyKamau/Matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MATRIX

A Linear Algebra Practice Projects I created to practice common matrix algorithms.

license last-commit repo-top-language repo-language-count

Built with the following language:

java


πŸ”— Table of Contents


πŸ“ Overview

This project provides the classes to implement Matrices, as well as perform several operations on them. This can be used to perform computations, store data, and more!


πŸ‘Ύ Features

There are two matrix classes, Matrix and Simplematrix. The difference is that the parameter type of Matrix must extend the Linear class, whereas SimpleMatrix does not have this restrition. This allows Matrix to support more mathematical operations whereas SimpleMatrix is simply a grid that stores data.

There are currently 4 Linear classes that may be used interchangably:
LinearInteger, an integer wrapper
LinearDouble, a double wrapper
LinearNaturalNumber, a wrapper of a custom Ohio State java component that represents the mathematical natural number set (see below on dependency)
and LinearVariable, a custom class meant to represent basic equations, still a wip

With these, the Matrix class supports a suite of operations, such as:
Addition
Subtraction
Augmenting
Transposing
Determinant
... and more!

Feel free to check it out!


πŸ“ Project Structure

└── Matrix/
    β”œβ”€β”€ CoolGridProject
    β”‚   β”œβ”€β”€ .checkstyle
    β”‚   β”œβ”€β”€ .classpath
    β”‚   β”œβ”€β”€ .project
    β”‚   β”œβ”€β”€ .settings
    β”‚   β”‚   └── org.eclipse.core.resources.prefs
    β”‚   β”œβ”€β”€ bin
    β”‚   β”‚   └── .gitignore
    β”‚   └── src
    β”‚       └── CoolGridProject.java
    β”œβ”€β”€ Matrix
    β”‚   β”œβ”€β”€ .checkstyle
    β”‚   β”œβ”€β”€ .classpath
    β”‚   β”œβ”€β”€ .project
    β”‚   β”œβ”€β”€ .settings
    β”‚   β”‚   └── org.eclipse.core.resources.prefs
    β”‚   β”œβ”€β”€ bin
    β”‚   β”‚   β”œβ”€β”€ .gitignore
    β”‚   β”‚   β”œβ”€β”€ CoolGridProject.class
    β”‚   β”‚   β”œβ”€β”€ Determinant.class
    β”‚   β”‚   β”œβ”€β”€ Matrix1LTest.class
    β”‚   β”‚   β”œβ”€β”€ Matrix2Test.class
    β”‚   β”‚   β”œβ”€β”€ MatrixHelper.class
    β”‚   β”‚   β”œβ”€β”€ MatrixIndex$Kind.class
    β”‚   β”‚   β”œβ”€β”€ MatrixIndex.class
    β”‚   β”‚   β”œβ”€β”€ MatrixTest.class
    β”‚   β”‚   β”œβ”€β”€ SystemOfEquationSolver.class
    β”‚   β”‚   β”œβ”€β”€ UserMatrix.class
    β”‚   β”‚   β”œβ”€β”€ VariableParser
    β”‚   β”‚   β”œβ”€β”€ VariableParserTest.class
    β”‚   β”‚   └── components
    β”‚   β”œβ”€β”€ data
    β”‚   β”‚   └── saveTest
    β”‚   β”œβ”€β”€ img
    β”‚   β”‚   β”œβ”€β”€ Checker_Black.png
    β”‚   β”‚   β”œβ”€β”€ Checker_Black_King.png
    β”‚   β”‚   β”œβ”€β”€ Checker_Red.png
    β”‚   β”‚   └── Checker_Red_King.png
    β”‚   β”œβ”€β”€ src
    β”‚   β”‚   β”œβ”€β”€ Checkers
    β”‚   β”‚   β”œβ”€β”€ CoolGridProject.java
    β”‚   β”‚   β”œβ”€β”€ Determinant.java
    β”‚   β”‚   β”œβ”€β”€ MatrixHelper.java
    β”‚   β”‚   β”œβ”€β”€ MatrixIndex.java
    β”‚   β”‚   β”œβ”€β”€ SystemOfEquationSolver.java
    β”‚   β”‚   β”œβ”€β”€ UserMatrix.java
    β”‚   β”‚   β”œβ”€β”€ VariableParser
    β”‚   β”‚   └── components
    β”‚   └── test
    β”‚       β”œβ”€β”€ Matrix1LTest.java
    β”‚       β”œβ”€β”€ Matrix2Test.java
    β”‚       β”œβ”€β”€ MatrixTest.java
    β”‚       β”œβ”€β”€ VariableParserTest.java
    β”‚       └── components
    └── readme.md

πŸ“‚ Project Index

MATRIX/
CoolGridProject
src
CoolGridProject.java Simple project made in one day, utilizing SimpleMatrix to represent a coordinate plane, with shape plotting
Matrix
src
Determinant.java Code to develop and test Determinant algoritm. Works but not thoroughly tested.
SystemOfEquationSolver.java Uses row reduction and Matrix to solve a system of equations.
MatrixIndex.java Helper class to store matrices created at runtime.
UserMatrix.java Methods to help create matrices from user input.
MatrixHelper.java Matrix helper methods.
CoolGridProject.java Simple project made in one day, utilizing SimpleMatrix to represent a coordinate plane, with shape plotting
VariableParser
VariableParser.java Methods to generate a LinearVariable object from user String input.
components
matrix
Matrix2.java Implementation of Matrix using the _UPDATE_ interface.
MatrixSecondary.java Secondary methods for the Matrix interface.
MatrixKernel.java Kernel methods for the Matrix interface.
Matrix1L.java Implementation of Matrix using the _UPDATE_ interface.
SimpleMatrix.java Implementation of SimpleMatrix using the _UPDATE_.
SimpleMatrix1L.java Implementation of SimpleMatrix using the _UPDATE_.
Matrix.java Implementation of Matrix using the _UPDATE_.
SimpleMatrixSecondary.java Secondary methods for SimpleMatrix.
linear
LinearInteger.java Linear class implementation on int
Linear.java Linear interface.
LinearVariable.java Linear class implementation on mathematical equations.
LinearDouble.java Linear class implementation on double
LinearNaturalNumber.java Linear class implementation on NaturalNumber
LinearSecondary.java Secondary Linear Methods
Checkers
CheckersController.java Controller for the Checkers game.
Checkers.java Checker board object code.
CheckersModel1.java Model implementation for the Checkers game.
CheckersController1.java Controller implementation for the Checkers game.
Piece.java Checker piece object code.
CheckersView1.java View implementation for the Checkers game.
CheckersView.java View for the Checkers game.
CheckersModel.java Model for the Checkers game.
test
Matrix2Test.java Tests for Matrix2.
VariableParserTest.java Tests for VariableParser.
MatrixTest.java Tests for Matrix.
Matrix1LTest.java Tests for Matrix1L.
components
linear
LinearNaturalNumberTest.java Tests for LinearNaturalNumber.
LinearIntegerTest.java Tests for LinearInteger.
LinearVariableTest.java Tests for LinerVariable.
LinearDoubleTest.java Tests for LinearDouble.

πŸš€ Getting Started

β˜‘οΈ Prerequisites

Before getting started with Matrix, ensure your runtime environment meets the following requirements:

  • Programming Language: Java

You will need the Ohio State Java components in order for parts of this project to work, such as LinearNaturalNumber, however they are not needed for any of the 1L implementations.

I will post instructions on how to install these in the future. In the meantime, enjoy playing with the other parts of this project!

βš™οΈ Installation

Install Matrix using one of the following methods:

I suggest importing this project into Eclipse, as it was used in the development of the project.

πŸ€– Usage

Run Matrix inside of Eclipse.

πŸ§ͺ Testing

Testing is done through JUnit, which may be done by running the test cases inside of the JUnit tab in Eclipse.


πŸ“Œ Project Roadmap

  • Task 1: Update Documentation.
  • Task 2: Test LinearVariable.
  • Task 3: Complete Determinant Algorithm.

πŸ”° Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/WesleyKamau/Matrix
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


πŸŽ— License

This project is protected under the MIT License. For more details, refer to the LICENSE file.


πŸ™Œ Acknowledgments

  • Shout out to my Linear Algebra professor!

About

Simple Java Interface for Matrices and Linear Algebra algorithms.

Resources

Stars

Watchers

Forks

Languages