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

Karl Wettin commented on MAHOUT-65:
-----------------------------------

Late submission, but I think I'd prefer if the labels was a bit less hard bound 
to vectors. And I want to associate them more than a name, at least class 
values too. Perhaps something like this:


{code:java}

abstract class Labels {
  double get(Vector v, String l) {
    return (v.get(indexOf(l));
  }
  void set(Vector v, String l, double w) {
    v.set(indexOf(l), w);
  }

  int indexOf(String);
  Label getLabel(int);
  Iterator<Label> iterate();
}

class Label {
  String name;
  enum Type { real, ordinal }
  Type type;
  List<String> ordinalValues;
}
{code} 


> 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
>            Reporter: Jeff Eastman
>         Attachments: MAHOUT-65.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