Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
aGrUM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
agrumery
aGrUM
Commits
d18070fd
Commit
d18070fd
authored
Oct 26, 2017
by
Gaspard Ducamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PyAgrum/doc] several doc added regarding graph manipulation
parent
51ae5b1c
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
358 additions
and
3 deletions
+358
-3
doc_CliqueGraph.i
wrappers/pyAgrum/doc/doc_CliqueGraph.i
+161
-0
doc_DAG.i
wrappers/pyAgrum/doc/doc_DAG.i
+1
-1
doc_DiGraph.i
wrappers/pyAgrum/doc/doc_DiGraph.i
+9
-1
doc_UndiGraph.i
wrappers/pyAgrum/doc/doc_UndiGraph.i
+184
-1
conf.py
wrappers/pyAgrum/doc/sphinx/conf.py
+1
-0
docs.i
wrappers/pyAgrum/docs.i
+2
-0
No files found.
wrappers/pyAgrum/doc/doc_CliqueGraph.i
0 → 100644
View file @
d18070fd
%feature("docstring") gum::CliqueGraph
"
CliqueGraph represents a Clique Graph.
Available constructors:
``CliqueGraph() -> CliqueGraph``
``CliqueGraph(src) -> CliqueGraph``
Parameters
----------
src : :class: CliqueGraph
the CliqueGraph to copy
"
%feature("docstring") gum::CliqueGraph::addToClique
"
Change the set of nodes included into a given clique and returns the new set
Parameters
----------
clique_id : int
the id of the clique
node_id : int
the id of the node
Warnings
--------
NotFound raised if clique_id does not exist
Warnings
--------
DuplicateElement raised if clique_id set already contains the ndoe
"
%feature("docstring") gum::CliqueGraph::clearEdges
"
Remove all edges and their separators
"
%feature("docstring") gum::CliqueGraph::clique
"
Parameters
----------
idClique : int
the id of the clique
Returns
-------
Set
The set of nodes included in the clique
Warnings
--------
NotFound raised if the clique does not belong to the clique graph
"
%feature("docstring") gum::CliqueGraph::container
"
Parameters
----------
idNode : int
the id of the node
Returns
-------
int
the id of a clique containing the node
Warnings
--------
NotFound raised if no clique contains idNode
"
%feature("docstring") gum::CliqueGraph::containerPath
"
Parameters
----------
node1 : int
the id of one node
node2 : int
the id of the other node
Returns
-------
List
a path from a clique containing node1 to a clique containing node2
Warnings
--------
NotFound raised if such path cannot be found
"
%feature("docstring") gum::CliqueGraph::eraseFromClique
"
Remove a node from a clique
Parameters
----------
clique_id : int
the id of the clique
node_id : int
the id of the node
Warnings
--------
NotFound raised if clique_id does not exist
"
%feature("docstring") gum::CliqueGraph::hasRunningIntersection
"
Returns
-------
bool
True if the running intersection property holds
"
%feature("docstring") gum::CliqueGraph::isJoinTree
"
Returns
-------
bool
True if the graph is a join tree
"
%feature("docstring") gum::CliqueGraph::separator
"
Parameters
----------
edge : Edge
the edge to be checked
clique1 : int
one extremity of the edge
clique : int
the other extremity of the edge
Returns
-------
Set
the separator included in a given edge
Warnings
--------
NotFound raised if the edge does not belong to the clique graph
"
%feature("docstring") gum::CliqueGraph::setClique
"
changes the set of nodes included into a given clique
Parameters
----------
idClique : int
the id of the clique
new_clique : Set
the new set of nodes to be included in the clique
Warnings
--------
NotFound exception if idClique is not a clique of the graph
"
\ No newline at end of file
wrappers/pyAgrum/doc/doc_DAG.i
View file @
d18070fd
...
...
@@ -46,7 +46,7 @@ Warnings
Returns
-------
str
a
description of the graph
a
friendly display of the graph in DOT format
Examples
--------
...
...
wrappers/pyAgrum/doc/doc_DiGraph.i
View file @
d18070fd
...
...
@@ -32,6 +32,14 @@ InvalidNode raised if head or tail does not belong to the graph nodes.
%feature("docstring") gum::DiGraph::addNode
"
Returns
-------
int
the new NodeId
"
%feature("docstring") gum::DiGraph::addNodeWithId
"
Add a node by choosing a new NodeId.
Returns
...
...
@@ -201,7 +209,7 @@ int
Returns
-------
str
a
description of the graph
a
friendly display of the graph in DOT format
Examples
--------
...
...
wrappers/pyAgrum/doc/doc_UndiGraph.i
View file @
d18070fd
%feature("docstring") gum::UndiGraph
"
UndiGraph represents a
D
irected Graph.
UndiGraph represents a
n Und
irected Graph.
Available constructors:
``UndiGraph() -> UndiGraph``
...
...
@@ -28,4 +28,187 @@ n2 : int
Warnings
--------
InvalidNode raised if n1 or n2 does not belong to the graph nodes.
"
%feature("docstring") gum::UndiGraph::addNode
"
Returns
-------
int
the new NodeId
"
%feature("docstring") gum::UndiGraph::addNodeWithId
"
Add a node by choosing a new NodeId.
Returns
-------
int
the new NodeId
"
%feature("docstring") gum::UndiGraph::clear
"
Remove all the nodes and edges from the graph.
"
%feature("docstring") gum::UndiGraph::edges
"
Returns
-------
List
the list of the edges
"
%feature("docstring") gum::UndiGraph::empty
"
Check if the graph is empty.
Returns
-------
bool
True if the graph is empty
"
%feature("docstring") gum::UndiGraph::emptyEdges
"
Check if the graph doesn't contains edges.
Returns
-------
bool
True if the graph doesn't contains edges
"
%feature("docstring") gum::UndiGraph::eraseEdge
"
Erase the edge between n1 and n2.
Parameters
----------
n1 : int
the id of the tail node
n2 : int
the id of the head node
"
%feature("docstring") gum::UndiGraph::eraseNeighbours
"
Erase all the edges adjacent to a given node.
Parameters
----------
n : int
the id of the node
"
%feature("docstring") gum::UndiGraph::eraseNode
"
Erase the node and all the adjacent edges.
Parameters
----------
id : int
the id of the node
"
%feature("docstring") gum::UndiGraph::existsEdge
"
Check if an edge exists bewteen n1 and n2.
Parameters
----------
n1 : int
the id of one extremity of the edge
n2 : int
the id of the other extremity if tge edge
Returns
-------
bool
True if the arc exists
"
%feature("docstring") gum::UndiGraph::existsNode
"
Check if a node with a certain id exists in the graph.
Parameters
----------
id : int
the checked id
Returns
-------
bool
True if the node exists
"
%feature("docstring") gum::UndiGraph::hasUndirectedCycle
"
Checks whether the graph contains cycles.
Returns
-------
bool
True if the graph contains a cycle
"
%feature("docstring") gum::UndiGraph::ids
"
Returns
-------
List
the list of ids
"
%feature("docstring") gum::UndiGraph::neighbours
"
Parameters
----------
id : int
the id of the checked node
Returns
-------
Set
The set of edges adjacent to the given node
"
%feature("docstring") gum::UndiGraph::partialUndiGraph
"
Parameters
----------
nodesSet : Set
The set of nodes composing the partial graph
Returns
-------
UndiGraph
The partial graph formed by the nodes given in parameter
"
%feature("docstring") gum::UndiGraph::size
"
Returns
-------
int
the number of nodes in the graph
"
%feature("docstring") gum::UndiGraph::sizeEdges
"
Returns
-------
int
the number of edges in the graph
"
%feature("docstring") gum::UndiGraph::toDot
"
Returns
-------
str
a friendly display of the graph in DOT format
"
\ No newline at end of file
wrappers/pyAgrum/doc/sphinx/conf.py
View file @
d18070fd
...
...
@@ -467,6 +467,7 @@ gumReplaceList = [
(
'gum::Idx'
,
'int'
),
(
'gum::Size'
,
'int'
),
(
'gum::NodeId'
,
'int'
),
(
'gum::NodeSet'
,
'Set'
),
(
'std::string'
,
'str'
),
(
'gum::'
,
'pyAgrum.'
),
(
'_double '
,
' '
),
...
...
wrappers/pyAgrum/docs.i
View file @
d18070fd
...
...
@@ -3,6 +3,8 @@
%include "doc_DiGraph.i"
%include "doc_DAG.i"
%include "doc_UndiGraph.i"
%include "doc_CliqueGraph.i"
%include "doc_MixedGraph.i"
%include "doc_LabelizedVariable.i"
%include "doc_DiscretizedVariable.i"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment