telepath / com.github.giedomak.telepath.kpathindex / KPathIndexInMemory

KPathIndexInMemory

class KPathIndexInMemory : KPathIndex (source)

InMemory implementation of the KPathIndex.

Constructors

<init>

KPathIndexInMemory(insertCallback: (Path) -> Unit = null)

InMemory implementation of the KPathIndex.

Properties

insertCallback

var insertCallback: (Path) -> Unit

Callback which will be called after insertion of a path into the index.

k

var k: Int

K indicates the paths with up to this K number of edges are indexed in the kPathIndex. For example: if K=2, the index contains all paths which have 1 or 2 edges along the path.

Functions

getStatisticsStore

fun getStatisticsStore(): StatisticsStoreReader

Delegate the statisticsStore to PathDB.

insert

fun insert(path: Path, dryRun: Boolean): Unit

Insert method to insert a Path into the KPathIndex.

search

fun search(pathPrefix: PathPrefix): Stream<Path>

Search method to lookup paths in the KPathIndex.