Package org.apache.lucene.util.hnsw
Class HnswUtil
java.lang.Object
org.apache.lucene.util.hnsw.HnswUtil
Utilities for use in tests involving HNSW graphs
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
graphIsRooted
(IndexReader reader, String vectorField) In graph theory, "connected components" are really defined only for undirected (ie bidirectional) graphs.
-
Method Details
-
graphIsRooted
In graph theory, "connected components" are really defined only for undirected (ie bidirectional) graphs. Our graphs are directed, because of pruning, but they are *mostly* undirected. In this case we compute components starting from a single node so what we are really measuring is whether the graph is a "rooted graph". TODO: measure whether the graph is "strongly connected" ie there is a path from every node to every other node.- Throws:
IOException
-