Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion redblackgraph/reference/calc_relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def lookup_relationship(da: int, db: int) -> str:
This is a very rudimentary implementation of a Consanguinity lookup and doesn't handle many
cases correctly.
:param da: generational distance from u to common ancestor
:param db: generational distance from v to common ancester
:param db: generational distance from v to common ancestor
:return: a string designating relationship
'''
removal = abs(da - db)
Expand Down
2 changes: 1 addition & 1 deletion redblackgraph/reference/rbg_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def MSB(x: int) -> int:

def avos_sum(x: int, y: int) -> int:
'''
The avos sum is the non-zero minumum of x and y
The avos sum is the non-zero minimum of x and y
:param x: operand 1
:param y: operand 2
:return: avos sum
Expand Down
2 changes: 1 addition & 1 deletion redblackgraph/sparse/csgraph/_rbg_math.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cdef inline bint avos_lt(DTYPE_t x, DTYPE_t y):

cdef inline DTYPE_t avos_sum(DTYPE_t x, DTYPE_t y):
'''
The avos sum is the non-zero minumum of x and y
The avos sum is the non-zero minimum of x and y
:param x: operand 1
:param y: operand 2
:return: avos sum
Expand Down
4 changes: 2 additions & 2 deletions redblackgraph/util/graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def init_builder(self, nv: int, ne: int):
def get_ordering(self) -> Sequence[int]:
if self.graph is None:
self.graph = rb.rb_matrix(coo_matrix((self.val, (self.row, self.col)), shape=(self.nv, self.nv)))

# For very large graphs, skip canonical ordering to avoid memory issues
# TODO: Implement sparse transitive closure or alternative ordering method
if self.nv > self.sparse_threshold:
Expand All @@ -56,7 +56,7 @@ def get_ordering(self) -> Sequence[int]:
)
# Return identity ordering (or could use topological sort if available)
return list(range(self.nv))

start_time = time.time()
print(f"Computing transitive closure...")
closure = self.graph.transitive_closure().W
Expand Down
Loading