Repository navigation
Add miscellaneous missing docs #960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0c5ba32
cde4678
975acd8
148eb65
6712150
958501f
225463d
dd7f710
8b8e021
b2592a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,6 +70,36 @@ gap> EdgeWeights(g); | |
| </ManSection> | ||
| <#/GAPDoc> | ||
|
|
||
| <#GAPDoc Label="UnitEdgeWeightedDigraph"> | ||
| <ManSection> | ||
| <Func Name="UnitEdgeWeightedDigraph" Arg="digraph"/> | ||
| <Returns>A digraph</Returns> | ||
| <Description> | ||
| <!-- TODO update/remove mutability when issue #860 is resolved --> | ||
| If <A>digraph</A> is immutable, <C>UnitEdgeWeightedDigraph</C> returns | ||
| an immutable edge-weighted copy of <A>digraph</A>, with all edge weights | ||
| set to 1. If <A>digraph</A> is mutable, the returned digraph will be | ||
| mutable, but will not have edge weights. <P/> | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be a statement about what happens when |
||
| See <Ref Attr="EdgeWeights"/>. | ||
| <!-- TODO update/remove D2 example when issue #860 is resolved --> | ||
| <Example><![CDATA[ | ||
| gap> D := Digraph([[2], [1, 3], [1]]); | ||
| <immutable digraph with 3 vertices, 4 edges> | ||
| gap> D1 := UnitEdgeWeightedDigraph(D); | ||
| <immutable edge-weighted digraph with 3 vertices, 4 edges> | ||
| gap> EdgeWeights(D1); | ||
| [ [ 1 ], [ 1, 1 ], [ 1 ] ] | ||
| gap> D2 := Digraph(IsMutableDigraph, [[2], [1, 3], [1]]);; | ||
| gap> UnitEdgeWeightedDigraph(D2); | ||
| <mutable digraph with 3 vertices, 4 edges> | ||
| gap> HasEdgeWeights(D2); | ||
| false | ||
| ]]></Example> | ||
| </Description> | ||
| </ManSection> | ||
| <#/GAPDoc> | ||
|
|
||
| <#GAPDoc Label="EdgeWeightedDigraphTotalWeight"> | ||
| <ManSection> | ||
| <Attr Name="EdgeWeightedDigraphTotalWeight" Arg="digraph"/> | ||
|
|
@@ -91,6 +121,25 @@ gap> EdgeWeightedDigraphTotalWeight(D); | |
| </ManSection> | ||
| <#/GAPDoc> | ||
|
|
||
| <#GAPDoc Label="IsNegativeEdgeWeightedDigraph"> | ||
| <ManSection> | ||
| <Prop Name="IsNegativeEdgeWeightedDigraph" Arg="digraph"/> | ||
| <Returns>A boolean.</Returns> | ||
| <Description> | ||
| If <A>digraph</A> has edge weights, then this returns <K>true</K> if | ||
| at least one edge has negative weight, and <K>false</K> otherwise. If | ||
| <A>digraph</A> has no edge weights, then an error is raised. | ||
| <Example><![CDATA[ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally the doc would also say what happens when |
||
| gap> D := EdgeWeightedDigraph([[2], [1]], [[5], [10]]);; | ||
| gap> IsNegativeEdgeWeightedDigraph(D); | ||
| false | ||
| gap> D := EdgeWeightedDigraph([[2], [1]], [[-5], [10]]);; | ||
| gap> IsNegativeEdgeWeightedDigraph(D); | ||
| true]]></Example> | ||
| </Description> | ||
| </ManSection> | ||
| <#/GAPDoc> | ||
|
|
||
| <#GAPDoc Label="EdgeWeightedDigraphMinimumSpanningTree"> | ||
| <ManSection> | ||
| <Attr Name="EdgeWeightedDigraphMinimumSpanningTree" Arg="digraph"/> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a TODO:
which you could also delete.