Skip to content

Commit

Permalink
add num_ch_nodes for sum nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
liuanji committed Mar 14, 2024
1 parent ab66287 commit e298620
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pyjuice/nodes/sum_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def num_edges(self):
"""
return self.edge_ids.size(1) * self.block_size * self.ch_block_size

@property
def num_ch_nodes(self):
return self.num_ch_node_blocks * self.ch_block_size

def duplicate(self, *args, tie_params: bool = False) -> SumNodes:
"""
Create a duplication of the current node with the same specification (i.e., number of nodes, block size).
Expand Down

0 comments on commit e298620

Please sign in to comment.