[ 
https://issues.apache.org/jira/browse/MAHOUT-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720883#action_12720883
 ] 

Ted Dunning commented on MAHOUT-65:
-----------------------------------

{noformat}
 public void testFour() throws IOException {
    int[] indexes = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    double[] values = { 1.111, 2.222, 3.333, 4.444, 5.555, 6.666, 7.777, 8.888,
        9.999 };
    TestVector obj = new TestVector(indexes, values);
    OutputStream stm = new ByteArrayOutputStream();
    ObjectOutputStream out = new ObjectOutputStream(stm);
    out.writeObject(obj);
    String json = stm.toString();
    System.out.println("4 " + json.length() + " = " + json);
  }
{noformat}

This looks like you are serializing this object to bytes and then converting 
those bytes to characters and printing them.  The name of the string is json, 
but I don't think the contents are anything like that.

What did you find surprising here?

> Add Element Labels to Vectors and Matrices
> ------------------------------------------
>
>                 Key: MAHOUT-65
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-65
>             Project: Mahout
>          Issue Type: New Feature
>          Components: Matrix
>    Affects Versions: 0.1
>            Reporter: Jeff Eastman
>            Assignee: Jeff Eastman
>         Attachments: MAHOUT-65-name.patch, MAHOUT-65-name.patch, 
> MAHOUT-65-name.patch, MAHOUT-65.patch, MAHOUT-65b.patch, MAHOUT-65c.patch, 
> MAHOUT-65d.patch
>
>
> Many applications can benefit by accessing elements in vectors and matrices 
> using String labels in addition to numeric indices. Investigate adding such a 
> capability.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to