Skip to content

Commit

Permalink
Support graphset argument in letter_P_graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
junkawahara committed Sep 16, 2024
1 parent 374f331 commit d208602
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphillion/graphset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2896,7 +2896,7 @@ def degree_distribution_graphs(deg_dist, is_connected, graphset=None):
return GraphSet(ss)

@staticmethod
def letter_P_graphs():
def letter_P_graphs(graphset=None):
"""Returns a GraphSet whose shape looks like letter 'P'.
That is, each subgraph has one vertex with degree 1,
one vertex with degree 3, and any number of vertices with
Expand All @@ -2909,7 +2909,7 @@ def letter_P_graphs():
A new GraphSet object.
"""
deg_dist = {0: GraphSet.DegreeDistribution_Any, 1: 1, 2: GraphSet.DegreeDistribution_Any, 3: 1}
return GraphSet.degree_distribution_graphs(deg_dist, True)
return GraphSet.degree_distribution_graphs(deg_dist, is_connected=True, graphset=graphset)

@staticmethod
def _conv_arg(obj):
Expand Down

0 comments on commit d208602

Please sign in to comment.