Pretty-print methods for BLAS objects
							parent
							
								
									9362214a31
								
							
						
					
					
						commit
						f1b745d76e
					
				| 
						 | 
					@ -1,4 +1,5 @@
 | 
				
			||||||
USING: kernel math.blas.matrices math.blas.vectors parser ;
 | 
					USING: kernel math.blas.matrices math.blas.vectors parser
 | 
				
			||||||
 | 
					arrays prettyprint.backend sequences ;
 | 
				
			||||||
IN: math.blas.syntax
 | 
					IN: math.blas.syntax
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: svector{ ( accum -- accum )
 | 
					: svector{ ( accum -- accum )
 | 
				
			||||||
| 
						 | 
					@ -18,3 +19,16 @@ IN: math.blas.syntax
 | 
				
			||||||
    \ } [ >float-complex-blas-matrix ] parse-literal ; parsing
 | 
					    \ } [ >float-complex-blas-matrix ] parse-literal ; parsing
 | 
				
			||||||
: zmatrix{ ( accum -- accum )
 | 
					: zmatrix{ ( accum -- accum )
 | 
				
			||||||
    \ } [ >double-complex-blas-matrix ] parse-literal ; parsing
 | 
					    \ } [ >double-complex-blas-matrix ] parse-literal ; parsing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{ \ } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{ \ } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					M: blas-vector-base >pprint-sequence ;
 | 
				
			||||||
 | 
					M: blas-matrix-base >pprint-sequence Mrows [ >array ] map ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue