Class SimplePrototypeModel<V>

  • All Implemented Interfaces:
    Model, PrototypeModel<V>, elki.result.textwriter.TextWriteable
    Direct Known Subclasses:
    CorrelationModel, MeanModel, MedoidModel

    public class SimplePrototypeModel<V>
    extends java.lang.Object
    implements PrototypeModel<V>, elki.result.textwriter.TextWriteable
    Cluster model that stores a prototype for each cluster.
    Since:
    0.7.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected V prototype
      Cluster prototype
      • Fields inherited from interface elki.data.model.Model

        TYPE
    • Constructor Summary

      Constructors 
      Constructor Description
      SimplePrototypeModel​(V prototype)
      Constructor with prototype
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V getPrototype()  
      java.lang.String getPrototypeType()
      Type of prototype (Median, Mean, ...) for printing.
      protected java.lang.String prototypeToString()
      Format the prototype as string.
      java.lang.String toString()  
      void writeToText​(elki.result.textwriter.TextWriterStream out, java.lang.String label)
      Implementation of TextWriteable interface.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • prototype

        protected V prototype
        Cluster prototype
    • Constructor Detail

      • SimplePrototypeModel

        public SimplePrototypeModel​(V prototype)
        Constructor with prototype
        Parameters:
        prototype - Cluster prototype
    • Method Detail

      • writeToText

        public void writeToText​(elki.result.textwriter.TextWriterStream out,
                                java.lang.String label)
        Description copied from interface: PrototypeModel
        Implementation of TextWriteable interface.
        Specified by:
        writeToText in interface Model
        Specified by:
        writeToText in interface PrototypeModel<V>
        Specified by:
        writeToText in interface elki.result.textwriter.TextWriteable
        Parameters:
        out - Output steam
        label - Optional label to prefix
      • prototypeToString

        protected java.lang.String prototypeToString()
        Format the prototype as string.
        Returns:
        Prototype
      • getPrototypeType

        public java.lang.String getPrototypeType()
        Description copied from interface: PrototypeModel
        Type of prototype (Median, Mean, ...) for printing.
        Specified by:
        getPrototypeType in interface PrototypeModel<V>
        Returns:
        String name
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object