2008-12-04 19:08:01 -05:00
|
|
|
USING: kernel math.blas.vectors math.blas.matrices parser
|
2009-01-28 16:07:16 -05:00
|
|
|
arrays prettyprint.backend prettyprint.custom sequences ;
|
2008-07-02 01:00:22 -04:00
|
|
|
IN: math.blas.syntax
|
|
|
|
|
2008-08-30 11:26:54 -04:00
|
|
|
: svector{
|
2008-07-02 01:00:22 -04:00
|
|
|
\ } [ >float-blas-vector ] parse-literal ; parsing
|
2008-08-30 11:26:54 -04:00
|
|
|
: dvector{
|
2008-07-02 01:00:22 -04:00
|
|
|
\ } [ >double-blas-vector ] parse-literal ; parsing
|
2008-08-30 11:26:54 -04:00
|
|
|
: cvector{
|
2008-07-02 01:00:22 -04:00
|
|
|
\ } [ >float-complex-blas-vector ] parse-literal ; parsing
|
2008-08-30 11:26:54 -04:00
|
|
|
: zvector{
|
2008-07-02 01:00:22 -04:00
|
|
|
\ } [ >double-complex-blas-vector ] parse-literal ; parsing
|
|
|
|
|
2008-08-30 11:26:54 -04:00
|
|
|
: smatrix{
|
2008-07-04 23:57:22 -04:00
|
|
|
\ } [ >float-blas-matrix ] parse-literal ; parsing
|
2008-08-30 11:26:54 -04:00
|
|
|
: dmatrix{
|
2008-07-04 23:57:22 -04:00
|
|
|
\ } [ >double-blas-matrix ] parse-literal ; parsing
|
2008-08-30 11:26:54 -04:00
|
|
|
: cmatrix{
|
2008-07-04 23:57:22 -04:00
|
|
|
\ } [ >float-complex-blas-matrix ] parse-literal ; parsing
|
2008-08-30 11:26:54 -04:00
|
|
|
: zmatrix{
|
2008-07-04 23:57:22 -04:00
|
|
|
\ } [ >double-complex-blas-matrix ] parse-literal ; parsing
|
2008-07-14 21:54:09 -04:00
|
|
|
|
2008-12-04 19:08:01 -05:00
|
|
|
M: float-blas-vector pprint-delims
|
|
|
|
drop \ svector{ \ } ;
|
|
|
|
M: double-blas-vector pprint-delims
|
|
|
|
drop \ dvector{ \ } ;
|
|
|
|
M: float-complex-blas-vector pprint-delims
|
|
|
|
drop \ cvector{ \ } ;
|
|
|
|
M: double-complex-blas-vector pprint-delims
|
|
|
|
drop \ zvector{ \ } ;
|
2008-07-14 21:54:09 -04:00
|
|
|
|
2008-12-04 19:08:01 -05:00
|
|
|
M: float-blas-matrix pprint-delims
|
|
|
|
drop \ smatrix{ \ } ;
|
|
|
|
M: double-blas-matrix pprint-delims
|
|
|
|
drop \ dmatrix{ \ } ;
|
|
|
|
M: float-complex-blas-matrix pprint-delims
|
|
|
|
drop \ cmatrix{ \ } ;
|
|
|
|
M: double-complex-blas-matrix pprint-delims
|
|
|
|
drop \ zmatrix{ \ } ;
|
2008-07-14 21:54:09 -04:00
|
|
|
|
|
|
|
M: blas-vector-base >pprint-sequence ;
|
2008-09-06 04:23:54 -04:00
|
|
|
M: blas-vector-base pprint* pprint-object ;
|
2008-07-15 11:57:24 -04:00
|
|
|
M: blas-matrix-base >pprint-sequence Mrows ;
|
2008-09-06 04:23:54 -04:00
|
|
|
M: blas-matrix-base pprint* pprint-object ;
|