Skip to content

Commit 71c2565

Browse files
committed
Initial commit
0 parents  commit 71c2565

16 files changed

+1402
-0
lines changed

changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2024-09-01
9+
10+
- Initial implementation
11+
12+
[1.0.0]: https://github.com/md-py/md.python.graph/releases/tag/1.0.0
19.9 KB
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@startuml
2+
3+
skinparam class {
4+
BackgroundColor #ebebeb
5+
ArrowColor #333
6+
BorderColor #333
7+
}
8+
9+
skinparam lineType ortho
10+
11+
package md.python.graph {
12+
interface GraphExceptionInterface {}
13+
14+
class TopologicalSortException extends GraphExceptionInterface {
15+
+ CYCLE_DETECTED = 1
16+
}
17+
18+
interface TopologicalSortInterface {
19+
+ sort(graph: GraphType) -> Iterable[NodeType]
20+
}
21+
22+
class AscendingTopologicalSort {
23+
+ sort(graph: GraphType) -> Iterable[NodeType]
24+
}
25+
26+
class DescendingTopologicalSort {
27+
+ sort(graph: GraphType) -> Iterable[NodeType]
28+
}
29+
30+
AscendingTopologicalSort .left.> TopologicalSortException : raises
31+
AscendingTopologicalSort -up-|> TopologicalSortInterface
32+
DescendingTopologicalSort -up-|> TopologicalSortInterface
33+
}
34+
35+
@enduml
Lines changed: 55 additions & 0 deletions
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
digraph example {
2+
edge [
3+
arrowsize="0.8";
4+
]
5+
6+
node [
7+
shape=box;
8+
fontsize="20";
9+
width="0.6";
10+
height="0.2";
11+
];
12+
13+
7 -> 5;
14+
7 -> 4;
15+
5 -> 3;
16+
5 -> 2;
17+
8 -> 5;
18+
8 -> 1;
19+
6 -> 5;
20+
4 -> 3;
21+
4 -> 1;
22+
}
10.4 KB
Loading
Lines changed: 115 additions & 0 deletions
Loading
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
digraph example {
2+
rankdir=LR;
3+
splines=ortho
4+
5+
edge [
6+
arrowsize="0.8";
7+
]
8+
9+
node [
10+
shape=box;
11+
fontsize="20";
12+
width="0.4";
13+
height="0.3";
14+
];
15+
16+
1 -> 2 -> 3;
17+
3 -> 2;
18+
1 -> 3;
19+
}
2.67 KB
Loading
Lines changed: 55 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)