org.apache.nutch.scoring.similarity.cosine

## Class DocVector

- java.lang.Object
- - org.apache.nutch.scoring.similarity.cosine.DocVector

-     public class DocVector
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.HashMap<java.lang.String,java.lang.Integer>` | `termFreqVector`
    `java.util.HashMap<java.lang.Integer,java.lang.Long>` | `termVector`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocVector()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `dotProduct(DocVector docVector)`
    `float` | `getL2Norm()`
    `void` | `setTermFreqVector(java.util.HashMap<java.lang.String,java.lang.Integer> termFreqVector)`
    `void` | `setVectorEntry(int pos, long freq)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### termVector

          public java.util.HashMap<java.lang.Integer,java.lang.Long> termVector

    - #### termFreqVector

          public java.util.HashMap<java.lang.String,java.lang.Integer> termFreqVector

  - ### Constructor Detail

    - #### DocVector

          public DocVector()

  - ### Method Detail

    - #### setTermFreqVector

          public void setTermFreqVector(java.util.HashMap<java.lang.String,java.lang.Integer> termFreqVector)

    - #### setVectorEntry

          public void setVectorEntry(int pos,
                                     long freq)

    - #### dotProduct

          public float dotProduct(DocVector docVector)

    - #### getL2Norm

          public float getL2Norm()

Copyright © 2019 The Apache Software Foundation