Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.0.0 #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# CHANGELOG

## [Unreleased]

### Changed

- [*In progress*] Implementing continuous storage for elements in the matrix.

## [1.0.0] - 2022.05.15

### Added

- Compile linking option `-lm` to the bash script. Also the option `--std=gnu99` to make the program ANSI/ISO conformant, plus allowing GNU extensions, like the constant `M_PI`.
- Qualifier `inline` (**C99**) to some 'fast' functions, like `nml_mat_get` and `nml_mat_set`.
- In `nml_mat_free()`: adding sentences to set pointers to `NULL`, after freeing.
- Adding documentation in a 'JavaDoc' style.
- Creating documentation in `LaTEX` format.
- Adding examples to the documentation (the purpose here is to generate a pedagogical material to teach the fundaments of matrices, using `mnl` as background).

### TODO

- Makefile
Binary file added Documentation.pdf
Binary file not shown.
75 changes: 75 additions & 0 deletions Paper/nml.aux
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldcontentsline\contentsline
\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\contentsline\oldcontentsline
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand*\HyPL@Entry[1]{}
\HyPL@Entry{0<</S/D>>}
\babel@aux{english}{}
\@writefile{toc}{\contentsline {section}{\numberline {1}The library}{2}{section.1}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}The data: {\tt nml\_matrix}}{3}{section.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {3}Allocating/deallocating memory for the {\tt nml\_mat} matrix}{4}{section.3}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4}The basic}{6}{section.4}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Creating a random matrix}{6}{subsection.4.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Creating a square matrix}{6}{subsection.4.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Creating an identity matrix}{7}{subsection.4.3}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5}Reading/Writing a matrix (IO methods)}{8}{section.5}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Printing matrix}{8}{subsection.5.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Creating a matrix from a FILE}{9}{subsection.5.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Reading a matrix from an array of numbers}{10}{subsection.5.3}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {6}Matrix methods}{12}{section.6}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Checking for equality}{12}{subsection.6.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}Retrieving / Selecting a column}{13}{subsection.6.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}Retrieving / Selecting a row}{13}{subsection.6.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Setting values}{14}{subsection.6.4}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}Multiplying a row with a scalar}{15}{subsection.6.5}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.6}Multiplying a column with a scalar}{16}{subsection.6.6}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.7}Adding two rows}{17}{subsection.6.7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {6.8}Multiplying the matrix by a scalar}{18}{subsection.6.8}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7}Modifying the {\tt nml\_mat} internal structure}{19}{section.7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Removing a column}{19}{subsection.7.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Removing a row}{20}{subsection.7.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {7.3}Swapping Rows}{21}{subsection.7.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {7.4}Swapping columns}{22}{subsection.7.4}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {7.5}Horizontal Concatenation of two matrices}{23}{subsection.7.5}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {7.6}Vertical concatenation}{25}{subsection.7.6}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {8}Basic Matrix Operations}{27}{section.8}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {8.1}Add two matrices}{27}{subsection.8.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {8.2}Substracting two matrices}{28}{subsection.8.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {8.3}Multiplying two matrices}{29}{subsection.8.3}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {9}Row Echelon Form}{32}{section.9}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}Example}{33}{subsection.9.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {9.2}Code implementation}{34}{subsection.9.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {10}Reduces Row Echelon Form}{35}{section.10}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}Code Implementation}{36}{subsection.10.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {10.2}Example}{37}{subsection.10.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {11}LU(P) Decomposition}{39}{section.11}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {11.1}The LU(P) algorithm as an example}{40}{subsection.11.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {11.2}Code implementation}{41}{subsection.11.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {11.3}Example}{43}{subsection.11.3}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {12}Solving linear systems of equations}{45}{section.12}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {12.1}Forward substitution}{45}{subsection.12.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {12.2}Backward substitution}{46}{subsection.12.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {12.3}Solving linear systems using LU(P) decomposition}{47}{subsection.12.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {12.4}Calculating the inverse of the matrix using LU(P) decomposition}{48}{subsection.12.4}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {12.5}Calculating the determinant of the matrix using LU(P) decomposition}{49}{subsection.12.5}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {12.6}Example}{50}{subsection.12.6}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {13}QR Decomposition}{52}{section.13}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {13.1}Example}{56}{subsection.13.1}\protected@file@percent }
\bibcite{ref}{1}
\bibcite{lup}{2}
\bibcite{qr}{3}
\bibcite{qr}{4}
\bibcite{vector-norm}{5}
\bibcite{dot-product}{6}
Binary file added Paper/nml.dvi
Binary file not shown.
Loading