1
0
Fork
You've already forked malg
0
Small school project focused on matrix algebra
  • C 95.3%
  • NewLisp 2.6%
  • CMake 1.4%
  • Perl 0.7%
2025年01月13日 23:22:46 +01:00
doc Some additional fixes in doc. 2025年01月13日 01:52:39 +01:00
res [FIX] small typo in check inside of main.c 2025年01月13日 23:22:46 +01:00
src [FIX] small typo in check inside of main.c 2025年01月13日 23:22:46 +01:00
.gitignore finished most of lang, fixed the adjugate and inverse, as well as memory leaks 2024年12月31日 20:03:49 +01:00
CMakeLists.txt Prettification and some cleanup. 2025年01月06日 04:27:37 +01:00
more.pl [FIX] found leak in fraction string length calculation, used numerator twice, no denominator. :) 2025年01月11日 01:21:02 +01:00
README.md Readme modification. 2025年01月06日 04:37:58 +01:00
valgrind-log.txt [FIX] small typo in check inside of main.c 2025年01月13日 23:22:46 +01:00

malg

A semester work, focusing on matrix algebra with fractions and a bit of text processing.

Building

Project is build by CMake.

mkdir build
cd build
# TODO: add the rest
cd ..
./build/malg #run from project root

Usage

To get the basic help message run:

malg

Syntax

Syntax is heavily inspired by Lisp and each expression follows same format.

(keyword parameter1 parameter2 ...)

Currently implemented keywords:

  • matrix - matrix creation
  • mcpy - create a copy of a matrix
  • mcpysx - create a submatrix from a matrix (exclude 1 row and 1 column)
  • madd - matrix addition
  • msub - matrix subtraction
  • mul - matrix multiplied by scalar
  • mdiv - matrix divided by scalar
  • mmul - matrix multiplication
  • mpow - matrix to power
  • minv - inverse matrix
  • madj - adjugate matrix
  • mtrans - transpose matrix
  • mdet - determinant
  • mrech - matrix to row echelon form
  • size - 2D size
  • data - array of fractions
  • print - print supported data

Whenever a word is parsed, it is first checked against a list of known keywords, then it is checked against matrix names. If no match is found, it is considered to be just word.

Some types may get converted to a diferrent data type based on the currently executed expression.

Documentation

Documentation can be found in doc/. One may build it themselves with makefile or just download the .pdf, although it may not be updated.