Package ghidra.features.bsim.query.protocol

# Class ResponseNearestVector

java.lang.Object
ghidra.features.bsim.query.protocol.QueryResponseRecord
ghidra.features.bsim.query.protocol.ResponseNearestVector

public class ResponseNearestVector extends QueryResponseRecord
Response to a QueryNearestVector request. It provides basic stats on the number of matching vectors and functions. Only a list of the matching vectors is returned, not the detailed FunctionDescription records of matches. Results are returned as SimilarityVectorResult objects, which cross-reference the original function queried and any similar vectors.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `QueryNearestVector`
  `qnear`
  `List<SimilarityVectorResult>`
  `result`
  `int`
  `totalmatch`
  `int`
  `totalvec`
  `int`
  `uniquematch`

  ### Fields inherited from class ghidra.features.bsim.query.protocol.QueryResponseRecord

  `name`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResponseNearestVector(QueryNearestVector q)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `mergeResults(QueryResponseRecord subresponse)`
  Combine partial results from subresponse into this global response
  `void`
  `restoreXml(XmlPullParser parser, LSHVectorFactory vectorFactory)`
  `void`
  `saveXml(Writer fwrite)`
  `void`
  `sort()`
  Perform any preferred sorting on the result of a query

  ### Methods inherited from class ghidra.features.bsim.query.protocol.QueryResponseRecord

  `getDescriptionManager, getLocalStagingCopy, getName`

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

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

- ## Field Details

  - ### totalvec

    public int totalvec

  - ### totalmatch

    public int totalmatch

  - ### uniquematch

    public int uniquematch

  - ### result

    public List<SimilarityVectorResult> result

  - ### qnear

    public QueryNearestVector qnear

- ## Constructor Details

  - ### ResponseNearestVector

    public ResponseNearestVector(QueryNearestVector q)

- ## Method Details

  - ### sort

    public void sort()
    Description copied from class: `QueryResponseRecord`
    Perform any preferred sorting on the result of a query
    Overrides:
      `sort` in class `QueryResponseRecord`

  - ### mergeResults

    public void mergeResults(QueryResponseRecord subresponse)
    Description copied from class: `QueryResponseRecord`
    Combine partial results from subresponse into this global response
    Overrides:
      `mergeResults` in class `QueryResponseRecord`
    Parameters:
      `subresponse` - the partial response to merge into this

  - ### saveXml

    public void saveXml(Writer fwrite) throws IOException
    Specified by:
      `saveXml` in class `QueryResponseRecord`
    Throws:
      `IOException`

  - ### restoreXml

    public void restoreXml(XmlPullParser parser, LSHVectorFactory vectorFactory) throws LSHException
    Specified by:
      `restoreXml` in class `QueryResponseRecord`
    Throws:
      `LSHException`