kececilayout 0.4.5__py3-none-any.whl → 0.4.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kececilayout/__init__.py +2 -1
- kececilayout/_version.py +1 -1
- kececilayout/kececi_layout.py +24 -11
- {kececilayout-0.4.5.dist-info → kececilayout-0.4.6.dist-info}/METADATA +1 -1
- kececilayout-0.4.6.dist-info/RECORD +8 -0
- kececilayout-0.4.5.dist-info/RECORD +0 -8
- {kececilayout-0.4.5.dist-info → kececilayout-0.4.6.dist-info}/WHEEL +0 -0
- {kececilayout-0.4.5.dist-info → kececilayout-0.4.6.dist-info}/licenses/LICENSE +0 -0
- {kececilayout-0.4.5.dist-info → kececilayout-0.4.6.dist-info}/top_level.txt +0 -0
kececilayout/__init__.py
CHANGED
|
@@ -10,7 +10,7 @@ import inspect
|
|
|
10
10
|
import warnings
|
|
11
11
|
|
|
12
12
|
# Paket sürüm numarası
|
|
13
|
-
__version__ = "0.4.
|
|
13
|
+
__version__ = "0.4.6"
|
|
14
14
|
|
|
15
15
|
# =============================================================================
|
|
16
16
|
# OTOMATİK İÇE AKTARMA VE __all__ OLUŞTURMA
|
|
@@ -143,3 +143,4 @@ def old_function_placeholder():
|
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
|
|
146
|
+
|
kececilayout/_version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _version.py
|
|
2
2
|
|
|
3
|
-
__version__ = "0.4.
|
|
3
|
+
__version__ = "0.4.6"
|
|
4
4
|
__license__ = "MIT"
|
|
5
5
|
__description__ = "A deterministic node placement algorithm used in graph visualization. In this layout, nodes are arranged sequentially along a defined primary axis. Each subsequent node is then alternately offset along a secondary, perpendicular axis, typically moving to one side of the primary axis and then the other. Often, the magnitude of this secondary offset increases as nodes progress along the primary axis, creating a characteristic zig-zag or serpentine pattern."
|
|
6
6
|
__author__ = "Mehmet Keçeci"
|
kececilayout/kececi_layout.py
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"""
|
|
4
4
|
kececilayout.py
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
ve gelişmiş görselleştirme stilleri sağlar.
|
|
6
|
+
This module provides sequential-zigzag ("Keçeci Layout") and advanced visualization styles for various Python graph libraries.
|
|
7
|
+
Bu modül, çeşitli Python graf kütüphaneleri için sıralı-zigzag ("Keçeci Layout") ve gelişmiş görselleştirme stilleri sağlar.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
import graphillion as gg
|
|
@@ -1111,11 +1111,28 @@ def to_networkx(graph):
|
|
|
1111
1111
|
"""Converts any supported graph type to a NetworkX graph."""
|
|
1112
1112
|
if isinstance(graph, nx.Graph):
|
|
1113
1113
|
return graph.copy()
|
|
1114
|
+
|
|
1114
1115
|
nx_graph = nx.Graph()
|
|
1116
|
+
|
|
1117
|
+
# PyZX graph support
|
|
1118
|
+
try:
|
|
1119
|
+
import pyzx as zx
|
|
1120
|
+
if hasattr(graph, 'vertices') and hasattr(graph, 'edges'):
|
|
1121
|
+
# PyZX graph olduğunu varsay
|
|
1122
|
+
for v in graph.vertices():
|
|
1123
|
+
nx_graph.add_node(v)
|
|
1124
|
+
for edge in graph.edges():
|
|
1125
|
+
if len(edge) == 2:
|
|
1126
|
+
nx_graph.add_edge(edge[0], edge[1])
|
|
1127
|
+
return nx_graph
|
|
1128
|
+
except ImportError:
|
|
1129
|
+
pass
|
|
1130
|
+
|
|
1131
|
+
# Diğer graph kütüphaneleri...
|
|
1115
1132
|
if rx and isinstance(graph, (rx.PyGraph, rx.PyDiGraph)):
|
|
1116
1133
|
nx_graph.add_nodes_from(graph.node_indices())
|
|
1117
1134
|
nx_graph.add_edges_from(graph.edge_list())
|
|
1118
|
-
elif ig and isinstance(graph, ig.Graph):
|
|
1135
|
+
elif ig and hasattr(ig, 'Graph') and isinstance(graph, ig.Graph):
|
|
1119
1136
|
nx_graph.add_nodes_from(v.index for v in graph.vs)
|
|
1120
1137
|
nx_graph.add_edges_from(graph.get_edgelist())
|
|
1121
1138
|
elif nk and isinstance(graph, nk.graph.Graph):
|
|
@@ -1123,16 +1140,16 @@ def to_networkx(graph):
|
|
|
1123
1140
|
nx_graph.add_edges_from(graph.iterEdges())
|
|
1124
1141
|
elif gg and isinstance(graph, gg.GraphSet):
|
|
1125
1142
|
edges = graph.universe()
|
|
1126
|
-
max_node_id =
|
|
1143
|
+
max_node_id = find_max_node_id(edges)
|
|
1127
1144
|
if max_node_id > 0:
|
|
1128
1145
|
nx_graph.add_nodes_from(range(1, max_node_id + 1))
|
|
1129
1146
|
nx_graph.add_edges_from(edges)
|
|
1130
1147
|
else:
|
|
1131
1148
|
# This block is rarely reached as _get_nodes_from_graph would fail first
|
|
1132
|
-
raise TypeError(f"Unsupported graph type {type(graph)} could not be converted to NetworkX.")
|
|
1133
1149
|
#raise TypeError(f"Desteklenmeyen graf tipi {type(graph)} NetworkX'e dönüştürülemedi.")
|
|
1134
|
-
|
|
1150
|
+
raise TypeError(f"Unsupported graph type {type(graph)} could not be converted to NetworkX.")
|
|
1135
1151
|
|
|
1152
|
+
return nx_graph
|
|
1136
1153
|
|
|
1137
1154
|
def _kececi_layout_3d_helix(nx_graph):
|
|
1138
1155
|
"""Internal function: Arranges nodes in a helix along the Z-axis."""
|
|
@@ -1319,7 +1336,7 @@ def _draw_internal(nx_graph, ax, style, **kwargs):
|
|
|
1319
1336
|
ax.set_title("Keçeci Layout: 3D Helix")
|
|
1320
1337
|
ax.set_axis_off()
|
|
1321
1338
|
ax.view_init(elev=20, azim=-60)
|
|
1322
|
-
"""
|
|
1339
|
+
"""
|
|
1323
1340
|
def _draw_internal(nx_graph, ax, style, **kwargs):
|
|
1324
1341
|
#Internal router that handles the different drawing styles.
|
|
1325
1342
|
layout_params = {
|
|
@@ -1443,7 +1460,3 @@ if __name__ == '__main__':
|
|
|
1443
1460
|
plt.show()
|
|
1444
1461
|
|
|
1445
1462
|
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
kececilayout/__init__.py,sha256=12AicnQi8b_Jmt4hOX2Mq64tuTAHGjv0dg2zcGKg4_s,4232
|
|
2
|
+
kececilayout/_version.py,sha256=qazsUuV6VwMVMYALTU44NoxJ7cG56PeQa1wjflwKaBk,813
|
|
3
|
+
kececilayout/kececi_layout.py,sha256=mUVoZJr0w7fSlZyY03diD4kA0KOdO6qAfWP9nKIKnhM,66598
|
|
4
|
+
kececilayout-0.4.6.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
|
|
5
|
+
kececilayout-0.4.6.dist-info/METADATA,sha256=Fi31dZrwdXKwrh7byGQgrgee_gRIc854HAFWuMeBpm4,73243
|
|
6
|
+
kececilayout-0.4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
kececilayout-0.4.6.dist-info/top_level.txt,sha256=OBzN_wm4q-iwSkeACF4E8ET_LFLJKBTldSH3D1jG2hA,13
|
|
8
|
+
kececilayout-0.4.6.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
kececilayout/__init__.py,sha256=J8gDPZhZ6EinF_2-jSaC6ZDJ8HyFZ3lgmHqILsAQFhA,4230
|
|
2
|
-
kececilayout/_version.py,sha256=ag7QDMboOIiBZKouMZEt0w5P2Q6kBDW7IyQLv4YqTAE,813
|
|
3
|
-
kececilayout/kececi_layout.py,sha256=KWPOvtPjzUbxzfDAAstBgvjoidtgGkixkfmoQNa7tgw,65990
|
|
4
|
-
kececilayout-0.4.5.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
|
|
5
|
-
kececilayout-0.4.5.dist-info/METADATA,sha256=DUd0YVpaKenyD3nJ74729kWXziDAsLt0TsSyy33ljpg,73243
|
|
6
|
-
kececilayout-0.4.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
kececilayout-0.4.5.dist-info/top_level.txt,sha256=OBzN_wm4q-iwSkeACF4E8ET_LFLJKBTldSH3D1jG2hA,13
|
|
8
|
-
kececilayout-0.4.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|