Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-1135

Unify decorated vectors in DecoratedVector<T>

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.0.0
    • None
    • classic

    Description

      I'm finding the current Vector classes in Mahout a bit confusing.
      The vector implementation are just fine, I'm talking more about the decorated vectors:
      WeightedVector
      MatrixSlice
      NamedVector

      I propose using a single DecoratedVector<T> type that can easily be extended.
      For example, right now MatrixSlice doesn't even implement the Vector interface.

      So,
      WeightedVector -> DecoratedVector<Pair<Integer, Double>>
      MatrixSlice -> DecoratedVector<Integer>
      NamedVector -> DecoratedVector<String>

      We could even keep the names (maybe changing MatrixSlice to something like IndexedVector though?) by extending DecoratedVector<T>.

      I'd be willing to fix this if people think it's a good idea.
      What about it?

      Attachments

        Activity

          People

            Unassigned Unassigned
            dfilimon Dan Filimon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: