@@ -34,7 +34,7 @@ package _NetworkX_, which we use to represent graphs:
3434
3535``` python
3636>> > import networkx as nx
37- >> > from bispy import paige_tarjan, dovier_piazza_policriti
37+ >> > from bispy import compute_maximum_bisimulation, Algorithms
3838```
3939
4040We then create a simple graph:
@@ -45,49 +45,50 @@ We then create a simple graph:
4545
4646It's important to set ` create_using=nx.DiGraph ` since ** BisPy** works only with
4747_ directed_ graphs. Now we can compute the _ maximum bisimulation_ using
48- _ Paige-Tarjan_ 's algorithm:
48+ _ Paige-Tarjan_ 's algorithm, which is the default for the function
49+ ` compute_maximum_bisimulation ` :
4950
5051``` python
51- >> > paige_tarjan (graph)
52+ >> > compute_maximum_bisimulation (graph)
5253[(7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 ), (3 , 4 , 5 , 6 ), (1 , 2 ), (0 ,)]
5354```
5455
55- as well as _ Dovier-Piazza-Policriti_ 's algorithm.
56+ We can use _ Dovier-Piazza-Policriti_ 's algorithm as well:
5657
5758``` python
58- >> > dovier_piazza_policriti (graph)
59+ >> > compute_maximum_bisimulation (graph, algorithm = Algorithms.DovierPiazzaPolicriti )
5960[(7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 ), (3 , 4 , 5 , 6 ), (1 , 2 ), (0 ,)]
6061
6162```
6263
6364We may also introduce a _ labeling set_ (or _ initial partition_ ):
6465
6566``` python
66- >> > dovier_piazza_policriti (graph, initial_partition = [(0 ,7 ,10 ), (1 ,2 ,3 ,4 ,5 ,6 ,8 ,9 ,11 ,12 ,13 ,14 )])
67+ >> > compute_maximum_bisimulation (graph, initial_partition = [(0 ,7 ,10 ), (1 ,2 ,3 ,4 ,5 ,6 ,8 ,9 ,11 ,12 ,13 ,14 )])
6768[(7 , 10 ), (8 , 9 , 11 , 12 , 13 , 14 ), (3 , 4 , 5 , 6 ), (1 , 2 ), (0 ,)]
6869
6970```
7071
7172### Saha
7273
73- In order to use * Saha * 's algorithm we only need to import the following
74+ In order to use _ Saha _ 's algorithm we only need to import the following
7475function:
7576
7677``` python
7778>> > from bispy import saha
7879```
7980
80- We call that function to obtain an object of type ` SahaPartition ` , which has
81- a method called ` add_edge ` . This method adds a new edge to the graph and
81+ We call that function to obtain an object of type ` SahaPartition ` , which has a
82+ method called ` add_edge ` . This method adds a new edge to the graph and
8283recomputes the maximum bisimulation incrementally:
8384
8485``` python
8586saha_partition = saha(graph)
8687```
8788
88- (We reused the ` graph ` object which we defined in the previous paragraph).
89- We can now use the aforementioned method ` add_edge ` (note that when you call
90- this method the instance of ` graph ` which you passed is ** not** modified):
89+ (We reused the ` graph ` object which we defined in the previous paragraph). We
90+ can now use the aforementioned method ` add_edge ` (note that when you call this
91+ method the instance of ` graph ` which you passed is ** not** modified):
9192
9293``` python
9394>> > for edge in [(1 ,0 ), (4 ,0 )]:
0 commit comments