You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Nakul Jindal (JIRA)" <ji...@apache.org> on 2016/05/27 22:22:12 UTC

[jira] [Commented] (SYSTEMML-693) Automatically invoke toString when user tries to print a matrix

    [ https://issues.apache.org/jira/browse/SYSTEMML-693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15304914#comment-15304914 ] 

Nakul Jindal commented on SYSTEMML-693:
---------------------------------------

After some looking around, I saw that there is more than one way to solve this. 
1. Do what Scalar printing does, change the "processInstruction" method and the "ScalarMatrixArithmetic"  to deal with printing.
    This is the easiest and most straightforward way.

2. Somehow wrap the "toString" HOP around the Matrix HOP.
    This is somewhat more involved

3. Insert the toString in the Parsing phase
    Type information is not available at parsing time, not sure if this is even feasible.
 

[~mboehm7], [~niketanpansare] - Any suggestions?

> Automatically invoke toString when user tries to print a matrix
> ---------------------------------------------------------------
>
>                 Key: SYSTEMML-693
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-693
>             Project: SystemML
>          Issue Type: Improvement
>          Components: Parser
>            Reporter: Nakul Jindal
>            Priority: Minor
>
> The {{toString}} builtin function was added as [PR #120|https://github.com/apache/incubator-systemml/pull/120] and SYSTEMML-693. 
> The way to print a matrix with this builtin function is
> {code}
> m = ... # Create Matrix
> print("matrix : " + toString(m))
> {code}
> To improve usability, the DML programmer should be able to say
> {code}
> m = ... # Create Matrix
> print("matrix : " + m)
> {code}
> The call to {{toString}} should be automatically inserted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)