Skip to content

Commit

Permalink
Merge pull request #17 from neuroneural/Documentation
Browse files Browse the repository at this point in the history
Documentation
  • Loading branch information
Girish-Anadv-07 authored Oct 11, 2023
2 parents 1b8f171 + 060df12 commit 7a0ea62
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 54 deletions.
1 change: 1 addition & 0 deletions gunfolds/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def graph2dot(g, filename):
def nx2graph(G):
"""
Convert NetworkX format graph to ``gunfolds`` graph ignoring bidirected edges
:param G: ``gunfolds`` format graph
:type G: dictionary (``gunfolds`` graphs)
Expand Down
13 changes: 7 additions & 6 deletions gunfolds/solvers/clingo_msl.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ def msl(g, capsize, exact=True, configuration="tweety", urate=2, timeout=0, pnum
:type timeout: integer
:param configuration: Select configuration based on problem type
frumpy: Use conservative defaults
jumpy : Use aggressive defaults
tweety: Use defaults geared towards asp problems
handy : Use defaults geared towards large problems
crafty: Use defaults geared towards crafted problems
trendy: Use defaults geared towards industrial problems
- ``frumpy`` : Use conservative defaults
- ``jumpy`` : Use aggressive defaults
- ``tweety`` : Use defaults geared towards asp problems
- ``handy`` : Use defaults geared towards large problems
- ``crafty`` : Use defaults geared towards crafted problems
- ``trendy`` : Use defaults geared towards industrial problems
:type configuration: string
:param pnum: number of parallel threads to run ``clingo`` on
Expand Down
46 changes: 26 additions & 20 deletions gunfolds/solvers/clingo_rasl.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,23 +368,28 @@ def drasl(glist, capsize=CAPSIZE, timeout=0, urate=0, weighted=False, scc=False,
:type edge_weights: tuple with 2 elements
:param configuration: Select configuration based on problem type
frumpy: Use conservative defaults
jumpy : Use aggressive defaults
tweety: Use defaults geared towards asp problems
handy : Use defaults geared towards large problems
crafty: Use defaults geared towards crafted problems
trendy: Use defaults geared towards industrial problems
- ``frumpy`` : Use conservative defaults
- ``jumpy`` : Use aggressive defaults
- ``tweety`` : Use defaults geared towards asp problems
- ``handy`` : Use defaults geared towards large problems
- ``crafty`` : Use defaults geared towards crafted problems
- ``trendy`` : Use defaults geared towards industrial problems
:type configuration: string
:param optim: a comma separated string containing configuration for optimization algorithm and optionally a bound
[<arg>[, <bound>]]
<arg>: <mode {opt|enum|optN|ignore}>[,<bound>...]
opt : Find optimal model
enum : Find models with costs <= <bound>
optN : Find optimum, then enumerate optimal models
ignore: Ignore optimize statements
<bound> : Set initial bound for objective function(s)
:param optim: a comma separated string containing configuration for optimization algorithm and optionally a bound [<arg>[, <bound>]]
- <arg> : <mode {opt|enum|optN|ignore}>
- ``opt`` : Find optimal model
- ``enum`` : Find models with costs <= <bound>
- ``optN`` : Find optimum, then enumerate optimal models
- ``ignore`` : Ignore optimize statements
- <bound> : Set initial bound for objective function(s)
:type optim: string
:returns: unique number for each graph considering only directed edges
:rtype: long integer
"""

:returns: results of parsed equivalent class
:rtype: dictionary
Expand Down Expand Up @@ -420,12 +425,13 @@ def rasl(g, capsize, timeout=0, urate=0, pnum=None, configuration="tweety"):
:type pnum: integer

:param configuration: Select configuration based on problem type
frumpy: Use conservative defaults
jumpy : Use aggressive defaults
tweety: Use defaults geared towards asp problems
handy : Use defaults geared towards large problems
crafty: Use defaults geared towards crafted problems
trendy: Use defaults geared towards industrial problems

- ``frumpy`` : Use conservative defaults
- ``jumpy`` : Use aggressive defaults
- ``tweety`` : Use defaults geared towards asp problems
- ``handy`` : Use defaults geared towards large problems
- ``crafty`` : Use defaults geared towards crafted problems
- ``trendy`` : Use defaults geared towards industrial problems
:type configuration: string

:returns: results of parsed equivalent class
Expand Down
58 changes: 30 additions & 28 deletions gunfolds/utils/clingo.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,27 @@ def run_clingo(command,
:type capsize: integer
:param configuration: Select configuration based on problem type
frumpy: Use conservative defaults
jumpy : Use aggressive defaults
tweety: Use defaults geared towards asp problems
handy : Use defaults geared towards large problems
crafty: Use defaults geared towards crafted problems
trendy: Use defaults geared towards industrial problems
- ``frumpy`` : Use conservative defaults
- ``jumpy`` : Use aggressive defaults
- ``tweety`` : Use defaults geared towards asp problems
- ``handy`` : Use defaults geared towards large problems
- ``crafty`` : Use defaults geared towards crafted problems
- ``trendy`` : Use defaults geared towards industrial problems
:type configuration: string
:param pnum: number of parallel threads to run clingo on
:type pnum: integer
:param optim: a comma separated string containing configuration for optimization algorithm and optionally a bound
[<arg>[, <bound>]]
<arg>: <mode {opt|enum|optN|ignore}>[,<bound>...]
opt : Find optimal model
enum : Find models with costs <= <bound>
optN : Find optimum, then enumerate optimal models
ignore: Ignore optimize statements
<bound> : Set initial bound for objective function(s)
:param optim: a comma separated string containing configuration for optimization algorithm and optionally a bound [<arg>[, <bound>]]
- <arg> : <mode {opt|enum|optN|ignore}>
- ``opt`` : Find optimal model
- ``enum`` : Find models with costs <= <bound>
- ``optN`` : Find optimum, then enumerate optimal models
- ``ignore`` : Ignore optimize statements
- <bound> : Set initial bound for objective function(s)
:type optim: string
:returns: results of equivalent class
Expand Down Expand Up @@ -106,22 +107,23 @@ def clingo(command, exact=True,
:type capsize: integer
:param configuration: Select configuration based on problem type
frumpy: Use conservative defaults
jumpy : Use aggressive defaults
tweety: Use defaults geared towards asp problems
handy : Use defaults geared towards large problems
crafty: Use defaults geared towards crafted problems
trendy: Use defaults geared towards industrial problems
- ``frumpy`` : Use conservative defaults
- ``jumpy`` : Use aggressive defaults
- ``tweety`` : Use defaults geared towards asp problems
- ``handy`` : Use defaults geared towards large problems
- ``crafty`` : Use defaults geared towards crafted problems
- ``trendy`` : Use defaults geared towards industrial problems
:type configuration: string
:param optim: a comma separated string containing configuration for optimization algorithm and optionally a bound
[<arg>[, <bound>]]
<arg>: <mode {opt|enum|optN|ignore}>[,<bound>...]
opt : Find optimal model
enum : Find models with costs <= <bound>
optN : Find optimum, then enumerate optimal models
ignore: Ignore optimize statements
<bound> : Set initial bound for objective function(s)
:param optim: a comma separated string containing configuration for optimization algorithm and optionally a bound [<arg>[, <bound>]]
- <arg> : <mode {opt|enum|optN|ignore}>
- ``opt`` : Find optimal model
- ``enum`` : Find models with costs <= <bound>
- ``optN`` : Find optimum, then enumerate optimal models
- ``ignore`` : Ignore optimize statements
- <bound> : Set initial bound for objective function(s)
:type optim: string
:param pnum: number of parallel threads to run clingo on
Expand Down

0 comments on commit 7a0ea62

Please sign in to comment.