diff --git a/redblackgraph/reference/calc_relationship.py b/redblackgraph/reference/calc_relationship.py index 24db15c..24a5821 100644 --- a/redblackgraph/reference/calc_relationship.py +++ b/redblackgraph/reference/calc_relationship.py @@ -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) diff --git a/redblackgraph/reference/rbg_math.py b/redblackgraph/reference/rbg_math.py index 7addce6..cf5cb0d 100644 --- a/redblackgraph/reference/rbg_math.py +++ b/redblackgraph/reference/rbg_math.py @@ -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 diff --git a/redblackgraph/sparse/csgraph/_rbg_math.pxi b/redblackgraph/sparse/csgraph/_rbg_math.pxi index d5ef712..4915da2 100644 --- a/redblackgraph/sparse/csgraph/_rbg_math.pxi +++ b/redblackgraph/sparse/csgraph/_rbg_math.pxi @@ -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 diff --git a/redblackgraph/util/graph_builder.py b/redblackgraph/util/graph_builder.py index 6c7d848..b211c18 100644 --- a/redblackgraph/util/graph_builder.py +++ b/redblackgraph/util/graph_builder.py @@ -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: @@ -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