Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Small Suffix Tree

Kotlin Suffix Tree extended implementation. Also can be used from Java.

Main features:

  • Opportunity to work with any type of tokens
  • Relatively small memory consumption (about 100 bytes per token)
  • Opportunity to work incrementally with number of strings
  • Opportunity to delete certain string from the tree
  • Opportunity to add strings with size up to 32766

Code sample

data class Token(val value: Int): Comparable<Token>{
    override fun compareTo(other: Token) = value.compareTo(other.value)
}
val sequence: List<Token> = <...>
val tree = SuffixTree<Token>()
val id = tree.add(sequence)
tree.removeSequence(id)

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages