Class IdHistogram
java.lang.Object
ghidra.features.bsim.query.client.IdHistogram
- All Implemented Interfaces:
Comparable<IdHistogram>
Lightweight object container of an LSHVector and its count within a collection of functions (database/executable)
TODO: This should likely be merged with SignatureRecord
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TreeSet
<IdHistogram> static Set
<IdHistogram> collectVectors
(DescriptionManager manage, Iterator<FunctionDescription> iter) Organize/histogram LSHVectors by hash.int
-
Field Details
-
id
public long id -
count
public int count -
vec
-
-
Constructor Details
-
IdHistogram
public IdHistogram()
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<IdHistogram>
-
buildVectorIdHistogram
- Parameters:
iter
- is iterator over functions whose vectors are to be histogrammed- Returns:
- the sorted list of pairs (hash,count)
-
collectVectors
public static Set<IdHistogram> collectVectors(DescriptionManager manage, Iterator<FunctionDescription> iter) Organize/histogram LSHVectors by hash. Take into account functions that don't have a vector. Record hashes in the FunctionDescription's SignatureRecord- Parameters:
manage
- is the container of the FunctionDescriptionsiter
- is the iterator over the FunctionDescriptions being collected- Returns:
- the histogram as a set of (id,count,vec) triples
-