Skip to content

Commit

Permalink
Added the last part of the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolLuca committed Apr 19, 2023
1 parent 77af09a commit b8c6b45
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions pydatastructs/utils/misc_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,16 @@ def remove_child(self, char: str) -> None:


class SuffixTreeNode(object):
"""
Represents a suffix tree node.
Parameters
==========
suffix_node
Required, an integer representing the suffix link of the node,
if not provided, it takes value -1
"""

def __new__ (cls, *args, **kwargs):
instance = super().__new__(cls)
return instance
Expand All @@ -583,6 +593,30 @@ def __repr__(self):


class SuffixTreeEdge(object):
"""
Represents a suffix tree edge.
Parameters
==========
first_char_index
Required, an integer representing the index
of the first character of the substring represented
by the edge.
last_char_index
Required, an integer representing the index
of the last character of the substring represented
by the edge.
source_node_index
Required, an integer representing the index
of the node at the source end of the edge.
dest_node_index
Required, an integer representing the index
of the node at the destination end of the edge.
"""

def __new__ (cls, *args, **kwargs):
instance = super().__new__(cls)
return instance
Expand All @@ -602,7 +636,23 @@ def __repr__(self):


class Suffix(object):
"""
Represents a suffix.
Parameters
==========
source_node_index
Requested, an integer representing the index of the
source node for the suffix.
first_char_index
Requested, an integer representing the index of the
first character in the suffix.
last_char_index
Requested, an integer representing the index of the
last character in the suffix.
"""
def __new__ (cls, *args, **kwargs):
instance = super().__new__(cls)
return instance
Expand Down

0 comments on commit b8c6b45

Please sign in to comment.