Questions tagged [linear-algebra]
For code that aims to resolve problems of linear algebra like vectors, vectorial space, linear transformations and systems of equations.
21 questions
2
votes
1
answer
96
views
Calculating the pattern behind the Levi-Civita symbol, works for all N >= 3
I have a code that calculates the pattern behind the Levi-Civita symbol. Unfortunately, it cheats for N >= 10. Any ideas how I can calculate the pattern for N >= 10 explicitly, without cheating? ...
8
votes
4
answers
1k
views
Calculating the determinant of a matrix using a purely analytical method that involves the "cross product" in nD
I've been conversing with the various AIs about the cross product in 3D and 7D. I've been lead to believe that n = 3 and n = 7 are only dimensions where the cross product is a well-defined operator. ...
2
votes
1
answer
80
views
Building Multi Period Linear Programming Matrices
I'm solving a linear programming problem, made of many small problems with some common shared constraints, meaning that they are all together.
Each individual unit has constraints unique to the unit ...
4
votes
2
answers
157
views
C - SIMD Code to invert a transformation matrix
I am writing a maths library for a raytracer project, and so I'm trying to make my heavy operations (like matrix inverse) more optimised. After doing some research, I discovered this trick to invert a ...
3
votes
3
answers
155
views
Determinant of matrix Python
This is an addition of my previous question Python matrix class. I've added a determinant function using Laplace expansion to my Matrix class. What I am looking for specifically is how 3x3 matrices ...
8
votes
5
answers
1k
views
Python matrix class
To prepare for my studies in linear algebra, I've decided to write a simple matrix class. This is the initial program, with functions to find the determinant and decomposition(s) to follow. I wanted ...
2
votes
1
answer
157
views
Multithreaded sparse linear solver in Python
I would like to know if there are any multithreaded sparse linear solvers for LU decomposed sparse matrices.
I want to increase the solving speed of a system like:
...
5
votes
3
answers
339
views
Find highest number of swaps within a set of possible duty swaps with networkx and PuLP
With huge help from Stack Overflow, I have created code which takes possible swap matches with given weights as an input and outputs a set of matches which gives the highest weight with the highest ...
2
votes
1
answer
103
views
Scene Hierarchy with Translation, Rotation and Scale
This code represents an Entity Component that holds and manipulates an entity's local and world transforms, dealing with hierarchy and translation/rotation/scale transformations. The code is written ...
-1
votes
1
answer
59
views
Python manual SVD only working for some matrices - how to stabilize it? [closed]
I use the following code for a manual single value decomposition using numpy. Depending on the array I choose it sometimes works out well and I can verify the svd and sometimes it does not work out ...
5
votes
2
answers
531
views
1
vote
1
answer
297
views
Implementing Preconditioned conjugate gradient
I have implemented the Preconditioned Conjugate Gradient (PCG) method for solving a system of linear equations in Python and I would appreciate it if someone could verify its correctness since I am ...
2
votes
1
answer
290
views
Python integer optimization with PuLP involving polynomials that I think can be faster
I have a problem where we are given multivariate polynomials in variables like y_i and z_j and the goal is to express them as sums of products of terms of the form y_i-z_j with nonnegative integer ...
5
votes
2
answers
553
views
Generic matrix library in Java
I have this repository. The most important source files follow.
com.github.coderodde.math.linear.matrix.AbstractMatrix.java:
...
2
votes
0
answers
79
views
Implementing PLU Decomposition in Rust
I am using abstalg, because I wanted to learn more about how to do this with generic fields, (So you can implement LU decomposition not just for floats). I used ...