org.apache.nutch.scoring.similarity.cosine

## Class DocVector

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

-     public class DocVector
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `HashMap<String,Integer>` | `termFreqVector`
    `HashMap<Integer,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(HashMap<String,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 HashMap<Integer,Long> termVector

    - #### termFreqVector

          public HashMap<String,Integer> termFreqVector

  - ### Constructor Detail

    - #### DocVector

          public DocVector()

  - ### Method Detail

    - #### setTermFreqVector

          public void setTermFreqVector(HashMap<String,Integer> termFreqVector)

    - #### setVectorEntry

          public void setVectorEntry(int pos,
                                     long freq)

    - #### dotProduct

          public float dotProduct(DocVector docVector)

    - #### getL2Norm

          public float getL2Norm()

Copyright © 2021 The Apache Software Foundation