|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.clustering.ClusterBase
public abstract class ClusterBase
Constructor Summary | |
---|---|
ClusterBase()
|
Method Summary | |
---|---|
abstract java.lang.String |
asFormatString()
Deprecated. |
java.lang.String |
asFormatString(java.lang.String[] bindings)
Produce a custom, printable representation of the receiver. |
java.lang.String |
asJsonString()
Produce a printable representation of the receiver using Json. |
abstract Vector |
computeCentroid()
|
static java.lang.String |
formatVector(Vector v,
java.lang.String[] bindings)
Return a human-readable formatted string representation of the vector, not intended to be complete nor usable as an input/output representation such as Json |
Vector |
getCenter()
|
int |
getId()
|
abstract java.lang.Object |
getIdentifier()
|
int |
getNumPoints()
|
Vector |
getPointTotal()
|
void |
readFields(java.io.DataInput in)
Reads in the id, nothing else |
void |
setCenter(Vector center)
|
void |
setId(int id)
|
void |
setNumPoints(int numPoints)
|
void |
setPointTotal(Vector pointTotal)
|
void |
write(java.io.DataOutput out)
Simply writes out the id, and that's it! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusterBase()
Method Detail |
---|
public int getId()
public void setId(int id)
public Vector getCenter()
public void setCenter(Vector center)
public int getNumPoints()
public void setNumPoints(int numPoints)
public Vector getPointTotal()
public void setPointTotal(Vector pointTotal)
@Deprecated public abstract java.lang.String asFormatString()
public java.lang.String asFormatString(java.lang.String[] bindings)
Printable
asFormatString
in interface Printable
bindings
- an optional String[] containing labels used to format the primary Vector/s of this
implementation.
public abstract Vector computeCentroid()
public abstract java.lang.Object getIdentifier()
public java.lang.String asJsonString()
Printable
asJsonString
in interface Printable
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
out
- The DataOutput
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public static java.lang.String formatVector(Vector v, java.lang.String[] bindings)
v
- a Vector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |