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

Second draft of linearalgebra.mac for the contrib folder. #1185

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Commits on Dec 5, 2023

  1. Merge pull request #5 from maths/master

    Update 06/12/23
    LukeLongworth authored Dec 5, 2023
    Configuration menu
    Copy the full SHA
    0ea3d41 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2024

  1. Configuration menu
    Copy the full SHA
    90540d5 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Create linearalgebra.mac

    Version 0.2 of linearalgebra.mac
    LukeLongworth authored Apr 3, 2024
    Configuration menu
    Copy the full SHA
    ac0052e View commit details
    Browse the repository at this point in the history
  2. Update linearalgebra.mac

    Remove the s_test_case for vec_convert that seems to be causing issues.
    LukeLongworth authored Apr 3, 2024
    Configuration menu
    Copy the full SHA
    f560ba7 View commit details
    Browse the repository at this point in the history
  3. Update linearalgebra.mac

    The convenience functions `c` and `r` throw errors regularly if non-conforming vectors are added/multiplied inappropriately, so the original solution of directly converting to matrix form was inappropriate. 
    
    The solution is to keep `c` and `r` as inert functions and use `vec_convert` to remove these as needed. Correspondingly, `vec_convert` now uses `errcatch` and will return the original expression when errors arise. A new predicate function, `vec_convertedp`, will detect whether an expression was successfully converted to matrix form.
    LukeLongworth authored Apr 3, 2024
    Configuration menu
    Copy the full SHA
    002d966 View commit details
    Browse the repository at this point in the history
  4. Create linearalgebra_no_test.mac

    Whilst editing questions I have found that saving and loading has been very burdensome compared to normal and my theory is that it runs all tests on every save, and on every preview (perhaps with deployed variants this would stop). This file exists with no `s_test_case` lines to see if the load times are improved.
    LukeLongworth authored Apr 3, 2024
    Configuration menu
    Copy the full SHA
    3291c7c View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. Update linearalgebra_no_test.mac

    Declared `c` and `r` to be nonscalar so that they behave appropriately with other matrices in expressions.
    LukeLongworth authored Apr 4, 2024
    Configuration menu
    Copy the full SHA
    0b457f1 View commit details
    Browse the repository at this point in the history
  2. Update linearalgebra_no_test.mac

    Fixed the vector display functions; they now display the tex-formatted entries rather than just the plaintex (how did I miss this earlier??)
    LukeLongworth authored Apr 4, 2024
    Configuration menu
    Copy the full SHA
    5c86b68 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. Update linearalgebra_no_test.mac

    Prevented divide by zero errors in integerify
    LukeLongworth authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    1954845 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Update linearalgebra_no_test.mac

    Fixed subspace_equiv
    Added col_vecp and row_vecp
    LukeLongworth authored Apr 19, 2024
    Configuration menu
    Copy the full SHA
    125f3b3 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. Update linearalgebra.mac

    v0.2 of linearalgebra.mac features most of the functions I expect to use, and test cases for almost all of these functions.  It contains:
    - Convenience functions for student vector input
    - Various predicate functions for vector and matrix properties
    - Functions to manipulate/extract parts of matrices
    - Functions to convert collections of vectors into a locally standard form (currently preferring lists of lists or matrices)
    - Functions to compare objects, typically checking for independence, or equivalence to subspaces.
    - Functions to convert collection of vectors to a basis
    - Extension of significantfigures to work for matrices
    - Extension of norm and cond functions to use the 2-norm
    - Extension of linsolve to accept matrix input and optionally use least squares
    - A function to produce smallest integer vector parallel to given vector (useful for eigenproblems!)
    - rowspace and nullTspace functions to pair with columnspace and nullspace
    - Rayleigh quotient calculation
    - Algebraic and geometric multiplicities of eigenvalues
    - Computing various matrices and factorisations, including rectangular diagonal matrix, projection matrices, QR, Jordan form, (orthgonal) diagonalisation, SVD, and pseudoinverse.
    
    Still to-do: 
    - Possibly write some eigenvalue/eigenvector predicates (need to determine what is actually useful)
    - Work on the disp_eqns function that produces nice LaTeX for displaying systems of linear equations. 
    - More functions will likely get added (and possibly removed) as work continues on local linear algebra course.
    LukeLongworth authored May 7, 2024
    Configuration menu
    Copy the full SHA
    4e3a9c3 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Update linearalgebra_no_test.mac

    Copy of linearalgebra.mac v0.2.3 (committed 8th May 2024) with the s_test_case lines removed.
    LukeLongworth authored May 8, 2024
    Configuration menu
    Copy the full SHA
    69bf4bc View commit details
    Browse the repository at this point in the history
  2. Update linearalgebra.mac

    Implemented old fix for integerify (missed in the upgrade to 0.2.3).
    LukeLongworth authored May 8, 2024
    Configuration menu
    Copy the full SHA
    90cbc3b View commit details
    Browse the repository at this point in the history
  3. Update linearalgebra_no_test.mac

    Implemented old fix to integerify (missed in upgrade to 0.2.3)
    LukeLongworth authored May 8, 2024
    Configuration menu
    Copy the full SHA
    595daa8 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Create linearalgebra_test.mac

    Following the fix to maths#1148: 
    
    maths@a35ebc0
    LukeLongworth authored May 9, 2024
    Configuration menu
    Copy the full SHA
    3242932 View commit details
    Browse the repository at this point in the history
  2. Delete stack/maxima/contrib/linearalgebra.mac

    Deleting file with plan to rename `linearalgebra_no_test` to `linearalgebra`
    LukeLongworth authored May 9, 2024
    Configuration menu
    Copy the full SHA
    0791cbf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e47734f View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. Update linearalgebra.mac

    Mostly a documentation update. 
    
    Also added checks in lin_indp and subspace_equiv so that they don't throw errors when given lists of lists of unequal length.
    LukeLongworth authored May 15, 2024
    Configuration menu
    Copy the full SHA
    5727f79 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. Update linearalgebra.mac

    - Added support for displaying augmented matrices easily using an inert function and texput. Also added `aug` and `de_aug` to convert matrices in and out of this mode.
    - Reworked `triu`, `tril`, `get_diag`, `triup`, `trilp`, `diagp`, and `diag_entries`. These should be significantly more efficient now. Thanks for the `genmatrix` tip-off Georg Osang!
    - Added `un_vec_convert` to change matrices into `c` and `r` form. Mostly intended for making teachers' answers the format we expect students to use.
    - Added a line to `make_list_of_lists` that will take a single vector and make it a list of a list. e.g. `[1,2,k]` -> `[[1,2,k]]`.
    - Edited `orthogonal_columnsp` and associated functions to forcibly expand the matrix before comparing. Thanks Georg! 
    - Added support for eigenproblems. This includes
      - `eigenvaluep` and `eigenvectorp` which check whether a given value or vector is "eigen". Optionally checks them against a given vector or value respectively. 
      - `get_eigenvalue` and `get_eigenvector` to extract the corresponding one from a given. Much nicer than using `eigenvectors` when you only want one! Can also orthonormalise the basis if requested.
      - Moved `Rayleigh` up to be with these.
    - Added support for vector parametric equations. It's a bit sparse, but these functions can check whether a given expression is of the desired form, and if so extract the useful bits (linear offset, direction vectors, parameters) and then format this nicely for TeX display. This is the only remaining TODO: add support for other vector input options, notably lists and ntuples. This will likely not happen in 2024. 
    - Finished off `disp_eqns` and added `mat_disp_eqns` to do the same given `A` and `b` instead of a list of equations. 
    - I've given up on PLU for now and have thus removed this section. I think that `rref`, `triangularize`, `echelon` and `lu_factor` do a good enough job, though it's still baffling to me that none of them do partial pivoting, nor do they avoid scaling rows unnecessarily.
    LukeLongworth authored May 29, 2024
    Configuration menu
    Copy the full SHA
    52af432 View commit details
    Browse the repository at this point in the history
  2. Update linearalgebra_test.mac

    Added test cases for v0.2.4
    LukeLongworth authored May 29, 2024
    Configuration menu
    Copy the full SHA
    45ea4c4 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. Update linearalgebra.mac

    Added 
    - rowscale and columnscale, intended as complements to rowop, rowswap, columnop and columnswap. It is odd that the third elementary row/column operation is not included by default.
    - setrowmx, setcolmx, and setdiagmx, intended as complements to setelmx. Used to overwrite rows, columns or diagonals.
    LukeLongworth authored Jun 10, 2024
    Configuration menu
    Copy the full SHA
    96780bb View commit details
    Browse the repository at this point in the history
  2. Update linearalgebra_test.mac

    Added tests for new functions in linearalgebra
    LukeLongworth authored Jun 10, 2024
    Configuration menu
    Copy the full SHA
    3c6d10e View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. Update linearalgebra.mac

    Changed the names of some functions per suggestions from others; added two more vector parametric equation functions to test whether a given point is in a given affine subspace and whether a given vector is in a given vector subspace.
    LukeLongworth authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    0dbcbc8 View commit details
    Browse the repository at this point in the history
  2. Update linearalgebra_test.mac

    Adjusted test cases for recent commit to linearalgebra.mac
    LukeLongworth authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    5273336 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Configuration menu
    Copy the full SHA
    2fdd9c3 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. Merge pull request #6 from geoo89/linear-algebra-beta

    Modify disp_eqns to support parameters
    LukeLongworth authored Jul 16, 2024
    Configuration menu
    Copy the full SHA
    35f7cc4 View commit details
    Browse the repository at this point in the history
  2. Fix make_list_of_lists and vector parametric equations

    I didn't realise that vectors of constants were also considered constants, so one of the if-statements in make_list_of_lists wasn't behaving as intended. 
    
    There may be a bug in point_in_affine_spacep; its 3rd test didn't work for me when running the whole bank of tests. I think that the problem is that I didn't declare local variables, so I have added that and I hope it fixes it.
    LukeLongworth authored Jul 16, 2024
    Configuration menu
    Copy the full SHA
    47e92ea View commit details
    Browse the repository at this point in the history
  3. Add tests for make_list_of_lists edit and fix two broken tests

    %i is NOT the corresponding eigenvalue for matrix([0,-1],[1,0]) and c(1,%i), so the ta should be false.
    
    get_eigenvector returns an empty list rather than false when given an incorrect eigenvalue, so the ta should be [] instead of false.
    LukeLongworth authored Jul 16, 2024
    Configuration menu
    Copy the full SHA
    a8e417e View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. Fixing disp_eqns bugs

    - Fixed a bug in disp_eqns where negative pivots were missing their minus sign when the pivot was not in the first column.
    - Added tex1 into the format_as_coeff function as suggested by Georg Osang
    
    TODO: Unit tests need updating.
    LukeLongworth authored Aug 15, 2024
    Configuration menu
    Copy the full SHA
    dad2cc1 View commit details
    Browse the repository at this point in the history