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
In addition to the current acceptable arguments for Q.Matrix, it ought to accept a Template literal (Template string) as a solo argument to make it trivially easy for something like this:
varm=newQ.Matrix(` 1 2 3 4 5 6 7 8`)
This makes the task of creating arbitrary matrices much more human readable than passing nested Arrays, or even just a series of Arrays. Parsing the arguments is simple: line returns indicate row breaks and white space indicates column breaks.
But the complication is that these tokens then need to be passed to Q.ComplexNumber (which Q.Matrix already does internally), and that constructor does not have a parser for interpreting a String. For example, var c = new Q.ComplexNumber( '1+2i' ) is not a handled use case. Yet.
Anyone want to write that complex number String parser? 😅
That’s already an open issue here: #4
(And although there’s a pull request attached to that, the code changes in that request do not seem to correspond to Q.ComplexNumber at all.)
The text was updated successfully, but these errors were encountered:
In addition to the current acceptable arguments for
Q.Matrix
, it ought to accept a Template literal (Template string) as a solo argument to make it trivially easy for something like this:This makes the task of creating arbitrary matrices much more human readable than passing nested Arrays, or even just a series of Arrays. Parsing the arguments is simple: line returns indicate row breaks and white space indicates column breaks.
But the complication is that these tokens then need to be passed to
Q.ComplexNumber
(whichQ.Matrix
already does internally), and that constructor does not have a parser for interpreting a String. For example,var c = new Q.ComplexNumber( '1+2i' )
is not a handled use case. Yet.Anyone want to write that complex number String parser? 😅
That’s already an open issue here: #4
(And although there’s a pull request attached to that, the code changes in that request do not seem to correspond to
Q.ComplexNumber
at all.)The text was updated successfully, but these errors were encountered: