Symbolic Interface for X-dimensional Systems, Equations, Vectors, and Eigen- Networks.
A terrible linear algebra and symbolic math system, the result of an off-handed comment by a linear algebra professor and absolute insistence on not manually doing homework.
- Crazy static type safety
- Structural typing for different number systems (fields, rings, ...)
- Flexible matrices and vectors, supporting any* valid number system
- Symbolic arithmetic system for any* valid number system
- Almost no functional dependency (most dependencies are from the type system)
*Well that's the plan at least, we'll see where it goes
from lib import *
def S(n):
return FieldSymbol(n, Fraction)
mat = Matrix(
("A" , 1 , -1) ,
("B" , 4 , 0 ) ,
("C" , 1 , 2 ),
num_type=S
)
print(det(mat)) # this is the correct deteminant trust-
matrix.rank() - Symbol number type
- Matrix needs to properly support commutative rings
- Matrix methods use
self.num_type(0)andself.num_type(1)for add and mult identity, make that part of number system -
detand inverse uses division, replace with the fancy algorithm
- Matrix methods use
- Maybe eigenvalue definition of sqrt of matrix
-
ChangeThis seems too complicated, the other way gets the idea acrossCallable[[Any],T]totype[T] - Unary
-/+ - Replace
__init__with__new__(maybe but probably not) - Implement equal for Matrix and Vector
- Symbol support for ops with
intandfloat - Refactor
Zmodto bind pattern - Implement default
num_typeforFieldSymbolor rework that system entirely - Split up files and make some folders
- Update unit tests
- Rewrite the entire add and mult term grouping again
- No more sorting as preprocessing, really expensive and doesn't work that well
- Still need sorting for display mostly, so who knows?
- diagonalise