You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to support matrices and matrix operations in AbMath. To do this we have to use one of several conventional ways to represent matrices on calculators.
To do this we need to make a breaking change on what constitutes left and right brackets and use aliasing to map them to lists and end parenthesis as appropriate.
In this context we will alias { to a new function named list and will alias } to ). This should allow us to use a the traditional matrix form of {{a,b},{c,d}} with this expanding out to list( list(a,b), list(c,d)).
A list is another name for a vector in this context. A vector of length n shall be treated as a matrix of size n x 1
We would need several rules in order for this to make sense when displayed to the user.
A list with a single element shall just return that element. IE 3{3} will always return 9
A list of lists shall be a matrix and for appropriate operators the matrix variants shall take precedence. We shall also need to include scalar and matrix variants of operators and all other functions and operators as logical shall be applied on all the elements of the data.
A list, vector, or matrix inside in all general math functions shall be treated as a list.
In certain functions such as total, avg, max, and min the list shall decompose and allow access to the underlying data contained therein. IE total({4,3,2}) - > total(4,3,2).
For all other functions the list shall cause the function to be applied on all the elements of the data. ln({e,pi,2}) -> {ln(e),ln(pi),ln(2)} or ln( {{a,b},{c,d}}) -> { {ln(a), ln(b)}, {ln(c),ln(d)} }
All functions and operators shall be classified as requiring decomposition, distribution, or having special variants for matrix support.
The text was updated successfully, but these errors were encountered:
The following operators shall have special matrix operators +, -, *, ^, /, and a yet to be implemented operator ` which will be the transpose operator (either Hermitian or regular).
I want to be able to support matrices and matrix operations in AbMath. To do this we have to use one of several conventional ways to represent matrices on calculators.
To do this we need to make a breaking change on what constitutes left and right brackets and use aliasing to map them to lists and end parenthesis as appropriate.
In this context we will alias
{
to a new function namedlist
and will alias}
to)
. This should allow us to use a the traditional matrix form of{{a,b},{c,d}}
with this expanding out tolist( list(a,b), list(c,d))
.A list is another name for a vector in this context. A vector of length
n
shall be treated as a matrix of sizen x 1
We would need several rules in order for this to make sense when displayed to the user.
A list with a single element shall just return that element. IE
3{3}
will always return9
A list of lists shall be a
matrix
and for appropriate operators the matrix variants shall take precedence. We shall also need to include scalar and matrix variants of operators and all other functions and operators as logical shall be applied on all the elements of the data.A list, vector, or matrix inside in all general math functions shall be treated as a list.
In certain functions such as
total
,avg
,max
, andmin
the list shall decompose and allow access to the underlying data contained therein. IEtotal({4,3,2}) - > total(4,3,2)
.For all other functions the list shall cause the function to be applied on all the elements of the data.
ln({e,pi,2}) -> {ln(e),ln(pi),ln(2)}
orln( {{a,b},{c,d}}) -> { {ln(a), ln(b)}, {ln(c),ln(d)} }
All functions and operators shall be classified as requiring decomposition, distribution, or having special variants for matrix support.
The text was updated successfully, but these errors were encountered: