## org.apache.mahout.math
Class MultiLabelVectorWritable

    java.lang.Object
      org.apache.mahout.math.MultiLabelVectorWritable

All Implemented Interfaces:
  org.apache.hadoop.io.Writable

    public final class MultiLabelVectorWritable

extends Object
implements org.apache.hadoop.io.Writable

Writable to handle serialization of a vector and a variable list of associated label indexes.

Constructor Summary
`MultiLabelVectorWritable()`
`MultiLabelVectorWritable(Vector vector, int[] labels)`

Method Summary
`int[]` `getLabels()`
`Vector` `getVector()`
`static MultiLabelVectorWritable` `read(DataInput in)`
`void` `readFields(DataInput in)`
`void` `setLabels(int[] labels)`
`void` `setVector(Vector vector)`
`void` `write(DataOutput out)`
`static void` `write(DataOutput out, SequentialAccessSparseVector ssv, int[] labels)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultiLabelVectorWritable

    public MultiLabelVectorWritable()

### MultiLabelVectorWritable

    public MultiLabelVectorWritable(Vector vector,
                                    int[] labels)

Method Detail

### getVector

    public Vector getVector()

### setVector

    public void setVector(Vector vector)

### setLabels

    public void setLabels(int[] labels)

### getLabels

    public int[] getLabels()

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Specified by:
    `readFields` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

### write

    public void write(DataOutput out)
               throws IOException

  Specified by:
    `write` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

### read

    public static MultiLabelVectorWritable read(DataInput in)
                                         throws IOException

  Throws:
    `IOException`

### write

    public static void write(DataOutput out,
                             SequentialAccessSparseVector ssv,
                             int[] labels)
                      throws IOException

  Throws:
    `IOException`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.