topologicpy 0.8.46__py3-none-any.whl → 0.8.47__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.
topologicpy/Graph.py CHANGED
@@ -381,9 +381,9 @@ class Graph:
381
381
  transferEdgeDictionaries : bool, optional
382
382
  If set to True, the dictionaries of the edges are transferred to the graph.
383
383
  tolerance : float , optional
384
- The desired tolerance. The default is 0.0001.
384
+ The desired tolerance. Default is 0.0001.
385
385
  silent : bool , optional
386
- If set to True, error and warning messages are suppressed. The default is False.
386
+ If set to True, error and warning messages are suppressed. Default is False.
387
387
 
388
388
  Returns
389
389
  -------
@@ -460,9 +460,9 @@ class Graph:
460
460
  vertex : topologic_core.Vertex
461
461
  The input vertex.
462
462
  tolerance : float , optional
463
- The desired tolerance. The default is 0.0001.
463
+ The desired tolerance. Default is 0.0001.
464
464
  silent : bool , optional
465
- If set to True, error and warning messages are suppressed. The default is False.
465
+ If set to True, error and warning messages are suppressed. Default is False.
466
466
 
467
467
  Returns
468
468
  -------
@@ -495,9 +495,9 @@ class Graph:
495
495
  vertices : list
496
496
  The input list of vertices.
497
497
  tolerance : float , optional
498
- The desired tolerance. The default is 0.0001.
498
+ The desired tolerance. Default is 0.0001.
499
499
  silent : bool , optional
500
- If set to True, error and warning messages are suppressed. The default is False.
500
+ If set to True, error and warning messages are suppressed. Default is False.
501
501
 
502
502
  Returns
503
503
  -------
@@ -533,13 +533,13 @@ class Graph:
533
533
  The input graph.
534
534
  vertexLabelKey : str , optional
535
535
  The returned vertices are labelled according to the dictionary values stored under this key.
536
- If the vertexLabelKey does not exist, it will be created and the vertices are labelled numerically and stored in the vertex dictionary under this key. The default is None.
536
+ If the vertexLabelKey does not exist, it will be created and the vertices are labelled numerically and stored in the vertex dictionary under this key. Default is None.
537
537
  edgeKey : str , optional
538
- If set, the edges' dictionaries will be searched for this key to set their weight. If the key is set to "length" (case insensitive), the length of the edge will be used as its weight. If set to None, a weight of 1 will be used. The default is "Length".
538
+ If set, the edges' dictionaries will be searched for this key to set their weight. If the key is set to "length" (case insensitive), the length of the edge will be used as its weight. If set to None, a weight of 1 will be used. Default is "Length".
539
539
  includeWeights : bool , optional
540
- If set to True, edge weights are included. Otherwise, they are not. The default is False.
540
+ If set to True, edge weights are included. Otherwise, they are not. Default is False.
541
541
  mantissa : int , optional
542
- The desired length of the mantissa. The default is 6.
542
+ The number of decimal places to round the result to. Default is 6.
543
543
 
544
544
  Returns
545
545
  -------
@@ -627,25 +627,25 @@ class Graph:
627
627
  graph : topologic_core.Graph
628
628
  The input graph.
629
629
  vertexKey : str , optional
630
- If set, the returned list of vertices is sorted according to the dictionary values stored under this key. The default is None.
630
+ If set, the returned list of vertices is sorted according to the dictionary values stored under this key. Default is None.
631
631
  reverse : bool , optional
632
- If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. The default is False.
632
+ If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. Default is False.
633
633
  edgeKeyFwd : str , optional
634
- If set, the value at this key in the connecting edge from start vertex to end vertex (forward) will be used instead of the value 1. The default is None. useEdgeIndex and useEdgeLength override this setting.
634
+ If set, the value at this key in the connecting edge from start vertex to end vertex (forward) will be used instead of the value 1. Default is None. useEdgeIndex and useEdgeLength override this setting.
635
635
  edgeKeyBwd : str , optional
636
- If set, the value at this key in the connecting edge from end vertex to start vertex (backward) will be used instead of the value 1. The default is None. useEdgeIndex and useEdgeLength override this setting.
636
+ If set, the value at this key in the connecting edge from end vertex to start vertex (backward) will be used instead of the value 1. Default is None. useEdgeIndex and useEdgeLength override this setting.
637
637
  bidirKey : bool , optional
638
- If set to True or False, this key in the connecting edge will be used to determine is the edge is supposed to be bidirectional or not. If set to None, the input variable bidrectional will be used instead. The default is None
638
+ If set to True or False, this key in the connecting edge will be used to determine is the edge is supposed to be bidirectional or not. If set to None, the input variable bidrectional will be used instead. Default is None
639
639
  bidirectional : bool , optional
640
- If set to True, the edges in the graph that do not have a bidireKey in their dictionaries will be treated as being bidirectional. Otherwise, the start vertex and end vertex of the connecting edge will determine the direction. The default is True.
640
+ If set to True, the edges in the graph that do not have a bidireKey in their dictionaries will be treated as being bidirectional. Otherwise, the start vertex and end vertex of the connecting edge will determine the direction. Default is True.
641
641
  useEdgeIndex : bool , optional
642
- If set to True, the adjacency matrix values will the index of the edge in Graph.Edges(graph). The default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
642
+ If set to True, the adjacency matrix values will the index of the edge in Graph.Edges(graph). Default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
643
643
  useEdgeLength : bool , optional
644
- If set to True, the adjacency matrix values will the length of the edge in Graph.Edges(graph). The default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
644
+ If set to True, the adjacency matrix values will the length of the edge in Graph.Edges(graph). Default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
645
645
  mantissa : int , optional
646
- The desired length of the mantissa. The default is 6.
646
+ The number of decimal places to round the result to. Default is 6.
647
647
  tolerance : float , optional
648
- The desired tolerance. The default is 0.0001.
648
+ The desired tolerance. Default is 0.0001.
649
649
 
650
650
  Returns
651
651
  -------
@@ -734,25 +734,25 @@ class Graph:
734
734
  graph : topologic_core.Graph
735
735
  The input graph.
736
736
  vertexKey : str , optional
737
- If set, the returned list of vertices is sorted according to the dictionary values stored under this key. The default is None.
737
+ If set, the returned list of vertices is sorted according to the dictionary values stored under this key. Default is None.
738
738
  reverse : bool , optional
739
- If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. The default is False.
739
+ If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. Default is False.
740
740
  edgeKeyFwd : str , optional
741
- If set, the value at this key in the connecting edge from start vertex to end vertex (forward) will be used instead of the value 1. The default is None. useEdgeIndex and useEdgeLength override this setting.
741
+ If set, the value at this key in the connecting edge from start vertex to end vertex (forward) will be used instead of the value 1. Default is None. useEdgeIndex and useEdgeLength override this setting.
742
742
  edgeKeyBwd : str , optional
743
- If set, the value at this key in the connecting edge from end vertex to start vertex (backward) will be used instead of the value 1. The default is None. useEdgeIndex and useEdgeLength override this setting.
743
+ If set, the value at this key in the connecting edge from end vertex to start vertex (backward) will be used instead of the value 1. Default is None. useEdgeIndex and useEdgeLength override this setting.
744
744
  bidirKey : bool , optional
745
- If set to True or False, this key in the connecting edge will be used to determine is the edge is supposed to be bidirectional or not. If set to None, the input variable bidrectional will be used instead. The default is None
745
+ If set to True or False, this key in the connecting edge will be used to determine is the edge is supposed to be bidirectional or not. If set to None, the input variable bidrectional will be used instead. Default is None
746
746
  bidirectional : bool , optional
747
- If set to True, the edges in the graph that do not have a bidireKey in their dictionaries will be treated as being bidirectional. Otherwise, the start vertex and end vertex of the connecting edge will determine the direction. The default is True.
747
+ If set to True, the edges in the graph that do not have a bidireKey in their dictionaries will be treated as being bidirectional. Otherwise, the start vertex and end vertex of the connecting edge will determine the direction. Default is True.
748
748
  useEdgeIndex : bool , optional
749
- If set to True, the adjacency matrix values will the index of the edge in Graph.Edges(graph). The default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
749
+ If set to True, the adjacency matrix values will the index of the edge in Graph.Edges(graph). Default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
750
750
  useEdgeLength : bool , optional
751
- If set to True, the adjacency matrix values will the length of the edge in Graph.Edges(graph). The default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
751
+ If set to True, the adjacency matrix values will the length of the edge in Graph.Edges(graph). Default is False. Both useEdgeIndex, useEdgeLength should not be True at the same time. If they are, useEdgeLength will be used.
752
752
  mantissa : int , optional
753
- The desired length of the mantissa. The default is 6.
753
+ The number of decimal places to round the result to. Default is 6.
754
754
  tolerance : float , optional
755
- The desired tolerance. The default is 0.0001.
755
+ The desired tolerance. Default is 0.0001.
756
756
 
757
757
  Returns
758
758
  -------
@@ -795,11 +795,11 @@ class Graph:
795
795
  graph : topologic_core.Graph
796
796
  The input graph.
797
797
  vertexKey : str , optional
798
- If set, the returned list of vertices is sorted according to the dictionary values stored under this key. The default is None.
798
+ If set, the returned list of vertices is sorted according to the dictionary values stored under this key. Default is None.
799
799
  reverse : bool , optional
800
- If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. The default is False.
800
+ If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. Default is False.
801
801
  tolerance : float , optional
802
- The desired tolerance. The default is 0.0001.
802
+ The desired tolerance. Default is 0.0001.
803
803
 
804
804
  Returns
805
805
  -------
@@ -850,7 +850,7 @@ class Graph:
850
850
  vertex : topologic_core.Vertex
851
851
  the input vertex.
852
852
  silent : bool , optional
853
- If set to True, error and warning messages are suppressed. The default is False.
853
+ If set to True, error and warning messages are suppressed. Default is False.
854
854
 
855
855
  Returns
856
856
  -------
@@ -884,11 +884,11 @@ class Graph:
884
884
  vertex : topologic_core.Vertex
885
885
  the input vertex.
886
886
  compassDirection : str , optional
887
- The compass direction. See Vector.CompassDirections(). The default is "Up".
887
+ The compass direction. See Vector.CompassDirections(). Default is "Up".
888
888
  tolerance : float , optional
889
- The desired tolerance. The default is 0.0001.
889
+ The desired tolerance. Default is 0.0001.
890
890
  silent : bool , optional
891
- If set to True, error and warning messages are suppressed. The default is False.
891
+ If set to True, error and warning messages are suppressed. Default is False.
892
892
 
893
893
  Returns
894
894
  -------
@@ -942,11 +942,11 @@ class Graph:
942
942
  vertex : topologic_core.Vertex
943
943
  the input vertex.
944
944
  vector : list , optional
945
- The vector direction. The default is [0,0,1].
945
+ The vector direction. Default is [0,0,1].
946
946
  tolerance : float , optional
947
- The desired tolerance. The default is 0.0001.
947
+ The desired tolerance. Default is 0.0001.
948
948
  silent : bool , optional
949
- If set to True, error and warning messages are suppressed. The default is False.
949
+ If set to True, error and warning messages are suppressed. Default is False.
950
950
 
951
951
  Returns
952
952
  -------
@@ -998,9 +998,9 @@ class Graph:
998
998
  vertexB : topologic_core.Vertex
999
999
  The second input vertex.
1000
1000
  timeLimit : int , optional
1001
- The time limit in second. The default is 10 seconds.
1001
+ The time limit in second. Default is 10 seconds.
1002
1002
  silent : bool , optional
1003
- If set to True, error and warning messages are suppressed. The default is False.
1003
+ If set to True, error and warning messages are suppressed. Default is False.
1004
1004
 
1005
1005
  Returns
1006
1006
  -------
@@ -1036,7 +1036,7 @@ class Graph:
1036
1036
  graph : topologic_core.Graph
1037
1037
  The input graph.
1038
1038
  mantissa : int , optional
1039
- The desired length of the mantissa. The default is 6.
1039
+ The number of decimal places to round the result to. Default is 6.
1040
1040
 
1041
1041
  Returns
1042
1042
  -------
@@ -1101,30 +1101,30 @@ class Graph:
1101
1101
  graph : topologic_core.Graph
1102
1102
  The input graph.
1103
1103
  bidirectional : bool , optional
1104
- If set to True, reverse relationships are created wherever possible. Otherwise, they are not. The default is False.
1104
+ If set to True, reverse relationships are created wherever possible. Otherwise, they are not. Default is False.
1105
1105
  includeAttributes : bool , optional
1106
- If set to True, the attributes associated with vertices in the graph are written out. Otherwise, they are not. The default is False.
1106
+ If set to True, the attributes associated with vertices in the graph are written out. Otherwise, they are not. Default is False.
1107
1107
  includeLabel : bool , optional
1108
- If set to True, a label is attached to each node. Otherwise, it is not. The default is False.
1108
+ If set to True, a label is attached to each node. Otherwise, it is not. Default is False.
1109
1109
  includeGeometry : bool , optional
1110
- If set to True, the geometry associated with vertices in the graph are written out. Otherwise, they are not. The default is False.
1110
+ If set to True, the geometry associated with vertices in the graph are written out. Otherwise, they are not. Default is False.
1111
1111
  siteLabel : str , optional
1112
- The desired site label. The default is "Site_0001".
1112
+ The desired site label. Default is "Site_0001".
1113
1113
  siteDictionary : dict , optional
1114
- The dictionary of site attributes to include in the output. The default is None.
1114
+ The dictionary of site attributes to include in the output. Default is None.
1115
1115
  buildingLabel : str , optional
1116
- The desired building label. The default is "Building_0001".
1116
+ The desired building label. Default is "Building_0001".
1117
1117
  buildingDictionary : dict , optional
1118
- The dictionary of building attributes to include in the output. The default is None.
1118
+ The dictionary of building attributes to include in the output. Default is None.
1119
1119
  storeyPrefix : str , optional
1120
- The desired prefixed to use for each building storey. The default is "Storey".
1120
+ The desired prefixed to use for each building storey. Default is "Storey".
1121
1121
  floorLevels : list , optional
1122
1122
  The list of floor levels. This should be a numeric list, sorted from lowest to highest.
1123
1123
  If not provided, floorLevels will be computed automatically based on the vertices' (zKey)) attribute. See below.
1124
1124
  verticesKey : str , optional
1125
- The desired key name to call vertices. The default is "vertices".
1125
+ The desired key name to call vertices. Default is "vertices".
1126
1126
  edgesKey : str , optional
1127
- The desired key name to call edges. The default is "edges".
1127
+ The desired key name to call edges. Default is "edges".
1128
1128
  vertexLabelKey : str , optional
1129
1129
  If set to a valid string, the vertex label will be set to the value at this key. Otherwise it will be set to Vertex_XXXX where XXXX is a sequential unique number.
1130
1130
  Note: If vertex labels are not unique, they will be forced to be unique.
@@ -1132,37 +1132,37 @@ class Graph:
1132
1132
  If set to a valid string, the edge label will be set to the value at this key. Otherwise it will be set to Edge_XXXX where XXXX is a sequential unique number.
1133
1133
  Note: If edge labels are not unique, they will be forced to be unique.
1134
1134
  sourceKey : str , optional
1135
- The dictionary key used to store the source vertex. The default is "source".
1135
+ The dictionary key used to store the source vertex. Default is "source".
1136
1136
  targetKey : str , optional
1137
- The dictionary key used to store the target vertex. The default is "target".
1137
+ The dictionary key used to store the target vertex. Default is "target".
1138
1138
  xKey : str , optional
1139
- The desired key name to use for x-coordinates. The default is "hasX".
1139
+ The desired key name to use for x-coordinates. Default is "hasX".
1140
1140
  yKey : str , optional
1141
- The desired key name to use for y-coordinates. The default is "hasY".
1141
+ The desired key name to use for y-coordinates. Default is "hasY".
1142
1142
  zKey : str , optional
1143
- The desired key name to use for z-coordinates. The default is "hasZ".
1143
+ The desired key name to use for z-coordinates. Default is "hasZ".
1144
1144
  geometryKey : str , optional
1145
- The desired key name to use for geometry. The default is "brep".
1145
+ The desired key name to use for geometry. Default is "brep".
1146
1146
  typeKey : str , optional
1147
- The dictionary key to use to look up the type of the node. The default is "type".
1147
+ The dictionary key to use to look up the type of the node. Default is "type".
1148
1148
  geometryKey : str , optional
1149
- The dictionary key to use to look up the geometry of the node. The default is "brep".
1149
+ The dictionary key to use to look up the geometry of the node. Default is "brep".
1150
1150
  spaceType : str , optional
1151
- The dictionary string value to use to look up vertices of type "space". The default is "space".
1151
+ The dictionary string value to use to look up vertices of type "space". Default is "space".
1152
1152
  wallType : str , optional
1153
- The dictionary string value to use to look up vertices of type "wall". The default is "wall".
1153
+ The dictionary string value to use to look up vertices of type "wall". Default is "wall".
1154
1154
  slabType : str , optional
1155
- The dictionary string value to use to look up vertices of type "slab". The default is "slab".
1155
+ The dictionary string value to use to look up vertices of type "slab". Default is "slab".
1156
1156
  doorType : str , optional
1157
- The dictionary string value to use to look up vertices of type "door". The default is "door".
1157
+ The dictionary string value to use to look up vertices of type "door". Default is "door".
1158
1158
  windowType : str , optional
1159
- The dictionary string value to use to look up vertices of type "window". The default is "window".
1159
+ The dictionary string value to use to look up vertices of type "window". Default is "window".
1160
1160
  contentType : str , optional
1161
- The dictionary string value to use to look up vertices of type "content". The default is "contents".
1161
+ The dictionary string value to use to look up vertices of type "content". Default is "contents".
1162
1162
  namespace : str , optional
1163
- The desired namespace to use in the BOT graph. The default is "http://github.com/wassimj/topologicpy/resources".
1163
+ The desired namespace to use in the BOT graph. Default is "http://github.com/wassimj/topologicpy/resources".
1164
1164
  mantissa : int , optional
1165
- The desired length of the mantissa. The default is 6.
1165
+ The number of decimal places to round the result to. Default is 6.
1166
1166
 
1167
1167
 
1168
1168
  Returns
@@ -1415,30 +1415,30 @@ class Graph:
1415
1415
  trix : Trix , RDF/XML-like format for RDF quads
1416
1416
  nquads : N-Quads , N-Triples-like format for RDF quads
1417
1417
  bidirectional : bool , optional
1418
- If set to True, reverse relationships are created wherever possible. Otherwise, they are not. The default is False.
1418
+ If set to True, reverse relationships are created wherever possible. Otherwise, they are not. Default is False.
1419
1419
  includeAttributes : bool , optional
1420
- If set to True, the attributes associated with vertices in the graph are written out. Otherwise, they are not. The default is False.
1420
+ If set to True, the attributes associated with vertices in the graph are written out. Otherwise, they are not. Default is False.
1421
1421
  includeLabel : bool , optional
1422
- If set to True, a label is attached to each node. Otherwise, it is not. The default is False.
1422
+ If set to True, a label is attached to each node. Otherwise, it is not. Default is False.
1423
1423
  includeGeometry : bool , optional
1424
- If set to True, the geometry associated with vertices in the graph are written out. Otherwise, they are not. The default is False.
1424
+ If set to True, the geometry associated with vertices in the graph are written out. Otherwise, they are not. Default is False.
1425
1425
  siteLabel : str , optional
1426
- The desired site label. The default is "Site_0001".
1426
+ The desired site label. Default is "Site_0001".
1427
1427
  siteDictionary : dict , optional
1428
- The dictionary of site attributes to include in the output. The default is None.
1428
+ The dictionary of site attributes to include in the output. Default is None.
1429
1429
  buildingLabel : str , optional
1430
- The desired building label. The default is "Building_0001".
1430
+ The desired building label. Default is "Building_0001".
1431
1431
  buildingDictionary : dict , optional
1432
- The dictionary of building attributes to include in the output. The default is None.
1432
+ The dictionary of building attributes to include in the output. Default is None.
1433
1433
  storeyPrefix : str , optional
1434
- The desired prefixed to use for each building storey. The default is "Storey".
1434
+ The desired prefixed to use for each building storey. Default is "Storey".
1435
1435
  floorLevels : list , optional
1436
1436
  The list of floor levels. This should be a numeric list, sorted from lowest to highest.
1437
1437
  If not provided, floorLevels will be computed automatically based on the vertices' (zKey)) attribute. See below.
1438
1438
  verticesKey : str , optional
1439
- The desired key name to call vertices. The default is "vertices".
1439
+ The desired key name to call vertices. Default is "vertices".
1440
1440
  edgesKey : str , optional
1441
- The desired key name to call edges. The default is "edges".
1441
+ The desired key name to call edges. Default is "edges".
1442
1442
  vertexLabelKey : str , optional
1443
1443
  If set to a valid string, the vertex label will be set to the value at this key. Otherwise it will be set to Vertex_XXXX where XXXX is a sequential unique number.
1444
1444
  Note: If vertex labels are not unique, they will be forced to be unique.
@@ -1446,35 +1446,35 @@ class Graph:
1446
1446
  If set to a valid string, the edge label will be set to the value at this key. Otherwise it will be set to Edge_XXXX where XXXX is a sequential unique number.
1447
1447
  Note: If edge labels are not unique, they will be forced to be unique.
1448
1448
  sourceKey : str , optional
1449
- The dictionary key used to store the source vertex. The default is "source".
1449
+ The dictionary key used to store the source vertex. Default is "source".
1450
1450
  targetKey : str , optional
1451
- The dictionary key used to store the target vertex. The default is "target".
1451
+ The dictionary key used to store the target vertex. Default is "target".
1452
1452
  xKey : str , optional
1453
- The desired key name to use for x-coordinates. The default is "hasX".
1453
+ The desired key name to use for x-coordinates. Default is "hasX".
1454
1454
  yKey : str , optional
1455
- The desired key name to use for y-coordinates. The default is "hasY".
1455
+ The desired key name to use for y-coordinates. Default is "hasY".
1456
1456
  zKey : str , optional
1457
- The desired key name to use for z-coordinates. The default is "hasZ".
1457
+ The desired key name to use for z-coordinates. Default is "hasZ".
1458
1458
  geometryKey : str , optional
1459
- The desired key name to use for geometry. The default is "brep".
1459
+ The desired key name to use for geometry. Default is "brep".
1460
1460
  typeKey : str , optional
1461
- The dictionary key to use to look up the type of the node. The default is "type".
1461
+ The dictionary key to use to look up the type of the node. Default is "type".
1462
1462
  spaceType : str , optional
1463
- The dictionary string value to use to look up vertices of type "space". The default is "space".
1463
+ The dictionary string value to use to look up vertices of type "space". Default is "space".
1464
1464
  wallType : str , optional
1465
- The dictionary string value to use to look up vertices of type "wall". The default is "wall".
1465
+ The dictionary string value to use to look up vertices of type "wall". Default is "wall".
1466
1466
  slabType : str , optional
1467
- The dictionary string value to use to look up vertices of type "slab". The default is "slab".
1467
+ The dictionary string value to use to look up vertices of type "slab". Default is "slab".
1468
1468
  doorType : str , optional
1469
- The dictionary string value to use to look up vertices of type "door". The default is "door".
1469
+ The dictionary string value to use to look up vertices of type "door". Default is "door".
1470
1470
  windowType : str , optional
1471
- The dictionary string value to use to look up vertices of type "window". The default is "window".
1471
+ The dictionary string value to use to look up vertices of type "window". Default is "window".
1472
1472
  contentType : str , optional
1473
- The dictionary string value to use to look up vertices of type "content". The default is "contents".
1473
+ The dictionary string value to use to look up vertices of type "content". Default is "contents".
1474
1474
  namespace : str , optional
1475
- The desired namespace to use in the BOT graph. The default is "http://github.com/wassimj/topologicpy/resources".
1475
+ The desired namespace to use in the BOT graph. Default is "http://github.com/wassimj/topologicpy/resources".
1476
1476
  mantissa : int , optional
1477
- The desired length of the mantissa. The default is 6.
1477
+ The number of decimal places to round the result to. Default is 6.
1478
1478
 
1479
1479
 
1480
1480
  Returns
@@ -1525,26 +1525,26 @@ class Graph:
1525
1525
  graph : topologic_core.Graph
1526
1526
  The input graph.
1527
1527
  method : str , optional
1528
- The method of computing the betweenness centrality. The options are "vertex" or "edge". The default is "vertex".
1528
+ The method of computing the betweenness centrality. The options are "vertex" or "edge". Default is "vertex".
1529
1529
  weightKey : str , optional
1530
1530
  If specified, the value in the connected edges' dictionary specified by the weightKey string will be aggregated to calculate
1531
1531
  the shortest path. If a numeric value cannot be retrieved from an edge, a value of 1 is used instead.
1532
1532
  This is used in weighted graphs. if weightKey is set to "Length" or "Distance", the length of the edge will be used as its weight.
1533
1533
  normalize : bool , optional
1534
- If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. The default is False.
1534
+ If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. Default is False.
1535
1535
  nxCompatible : bool , optional
1536
- If set to True, and normalize input parameter is also set to True, the values are set to be identical to NetworkX values. Otherwise, they are normalized between 0 and 1. The default is False.
1536
+ If set to True, and normalize input parameter is also set to True, the values are set to be identical to NetworkX values. Otherwise, they are normalized between 0 and 1. Default is False.
1537
1537
  key : str , optional
1538
- The desired dictionary key under which to store the betweenness centrality score. The default is "betweenness_centrality".
1538
+ The desired dictionary key under which to store the betweenness centrality score. Default is "betweenness_centrality".
1539
1539
  colorKey : str , optional
1540
- The desired dictionary key under which to store the betweenness centrality color. The default is "betweenness_centrality".
1540
+ The desired dictionary key under which to store the betweenness centrality color. Default is "betweenness_centrality".
1541
1541
  colorScale : str , optional
1542
- The desired type of plotly color scales to use (e.g. "viridis", "plasma"). The default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
1542
+ The desired type of plotly color scales to use (e.g. "viridis", "plasma"). Default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
1543
1543
  In addition to these, three color-blind friendly scales are included. These are "protanopia", "deuteranopia", and "tritanopia" for red, green, and blue colorblindness respectively.
1544
1544
  mantissa : int , optional
1545
- The desired length of the mantissa. The default is 6.
1545
+ The number of decimal places to round the result to. Default is 6.
1546
1546
  tolerance : float , optional
1547
- The desired tolerance. The default is 0.0001.
1547
+ The desired tolerance. Default is 0.0001.
1548
1548
 
1549
1549
  Returns
1550
1550
  -------
@@ -1615,16 +1615,16 @@ class Graph:
1615
1615
  graph : topologicp.Graph
1616
1616
  The input topologic graph.
1617
1617
  n : int , optional
1618
- The desired number of partitions when selecting the "Betweenness" method. This parameter is ignored for other methods. The default is 2.
1618
+ The desired number of partitions when selecting the "Betweenness" method. This parameter is ignored for other methods. Default is 2.
1619
1619
  m : int , optional
1620
- The desired maximum number of tries to partition the graph when selecting the "Betweenness" method. This parameter is ignored for other methods. The default is 10.
1620
+ The desired maximum number of tries to partition the graph when selecting the "Betweenness" method. This parameter is ignored for other methods. Default is 10.
1621
1621
  key : str , optional
1622
- The vertex and edge dictionary key under which to store the parition number. The default is "partition".
1622
+ The vertex and edge dictionary key under which to store the parition number. Default is "partition".
1623
1623
  Valid partition numbers start from 1. Cut edges receive a partition number of 0.
1624
1624
  tolerance : float , optional
1625
- The desired tolerance. The default is 0.0001.
1625
+ The desired tolerance. Default is 0.0001.
1626
1626
  silent : bool , optional
1627
- If set to True, error and warning messages are suppressed. The default is False.
1627
+ If set to True, error and warning messages are suppressed. Default is False.
1628
1628
 
1629
1629
  Returns
1630
1630
  -------
@@ -1684,9 +1684,9 @@ class Graph:
1684
1684
  graph : topologic_core.Graph
1685
1685
  The input graph.
1686
1686
  key : str , optional
1687
- The edge dictionary key under which to store the bridge status. 0 means the edge is NOT a bridge. 1 means that the edge IS a bridge. The default is "bridge".
1687
+ The edge dictionary key under which to store the bridge status. 0 means the edge is NOT a bridge. 1 means that the edge IS a bridge. Default is "bridge".
1688
1688
  silent : bool , optional
1689
- If set to True, error and warning messages are suppressed. The default is False.
1689
+ If set to True, error and warning messages are suppressed. Default is False.
1690
1690
 
1691
1691
  Returns
1692
1692
  -------
@@ -1787,7 +1787,7 @@ class Graph:
1787
1787
  A list of dictionaries to assign to the vertices of the graph. This list should be in
1788
1788
  the same order and of the same length as the rows in the adjacency matrix.
1789
1789
  silent : bool , optional
1790
- If set to True, no warnings or error messages are displayed. The default is False.
1790
+ If set to True, no warnings or error messages are displayed. Default is False.
1791
1791
 
1792
1792
  Returns
1793
1793
  -------
@@ -1816,23 +1816,23 @@ class Graph:
1816
1816
  A list of dictionaries to assign to the vertices of the graph. This list should be in
1817
1817
  the same order and of the same length as the rows in the adjacency matrix.
1818
1818
  edgeKeyFwd : str , optional
1819
- The dictionary key under which to store the edge weight value for forward edge. The default is "weight".
1819
+ The dictionary key under which to store the edge weight value for forward edge. Default is "weight".
1820
1820
  edgeKeyBwd : str , optional
1821
- The dictionary key under which to store the edge weight value for backward edge. The default is "weight".
1821
+ The dictionary key under which to store the edge weight value for backward edge. Default is "weight".
1822
1822
  xMin : float , optional
1823
- The desired minimum value to assign for a vertex's X coordinate. The default is -0.5.
1823
+ The desired minimum value to assign for a vertex's X coordinate. Default is -0.5.
1824
1824
  yMin : float , optional
1825
- The desired minimum value to assign for a vertex's Y coordinate. The default is -0.5.
1825
+ The desired minimum value to assign for a vertex's Y coordinate. Default is -0.5.
1826
1826
  zMin : float , optional
1827
- The desired minimum value to assign for a vertex's Z coordinate. The default is -0.5.
1827
+ The desired minimum value to assign for a vertex's Z coordinate. Default is -0.5.
1828
1828
  xMax : float , optional
1829
- The desired maximum value to assign for a vertex's X coordinate. The default is 0.5.
1829
+ The desired maximum value to assign for a vertex's X coordinate. Default is 0.5.
1830
1830
  yMax : float , optional
1831
- The desired maximum value to assign for a vertex's Y coordinate. The default is 0.5.
1831
+ The desired maximum value to assign for a vertex's Y coordinate. Default is 0.5.
1832
1832
  zMax : float , optional
1833
- The desired maximum value to assign for a vertex's Z coordinate. The default is 0.5.
1833
+ The desired maximum value to assign for a vertex's Z coordinate. Default is 0.5.
1834
1834
  silent : bool , optional
1835
- If set to True, no warnings or error messages are displayed. The default is False.
1835
+ If set to True, no warnings or error messages are displayed. Default is False.
1836
1836
 
1837
1837
  Returns
1838
1838
  -------
@@ -2096,49 +2096,49 @@ class Graph:
2096
2096
  path : str
2097
2097
  The path to the folder containing the .yaml and .csv files for graphs, edges, and nodes.
2098
2098
  graphIDHeader : str , optional
2099
- The column header string used to specify the graph id. The default is "graph_id".
2099
+ The column header string used to specify the graph id. Default is "graph_id".
2100
2100
  graphLabelHeader : str , optional
2101
- The column header string used to specify the graph label. The default is "label".
2101
+ The column header string used to specify the graph label. Default is "label".
2102
2102
  graphFeaturesHeader : str , optional
2103
- The column header string used to specify the graph features. The default is "feat".
2103
+ The column header string used to specify the graph features. Default is "feat".
2104
2104
  edgeSRCHeader : str , optional
2105
- The column header string used to specify the source vertex id of edges. The default is "src_id".
2105
+ The column header string used to specify the source vertex id of edges. Default is "src_id".
2106
2106
  edgeDSTHeader : str , optional
2107
- The column header string used to specify the destination vertex id of edges. The default is "dst_id".
2107
+ The column header string used to specify the destination vertex id of edges. Default is "dst_id".
2108
2108
  edgeLabelHeader : str , optional
2109
- The column header string used to specify the label of edges. The default is "label".
2109
+ The column header string used to specify the label of edges. Default is "label".
2110
2110
  edgeTrainMaskHeader : str , optional
2111
- The column header string used to specify the train mask of edges. The default is "train_mask".
2111
+ The column header string used to specify the train mask of edges. Default is "train_mask".
2112
2112
  edgeValidateMaskHeader : str , optional
2113
- The column header string used to specify the validate mask of edges. The default is "val_mask".
2113
+ The column header string used to specify the validate mask of edges. Default is "val_mask".
2114
2114
  edgeTestMaskHeader : str , optional
2115
- The column header string used to specify the test mask of edges. The default is "test_mask".
2115
+ The column header string used to specify the test mask of edges. Default is "test_mask".
2116
2116
  edgeFeaturesHeader : str , optional
2117
- The column header string used to specify the features of edges. The default is "feat".
2117
+ The column header string used to specify the features of edges. Default is "feat".
2118
2118
  edgeFeaturesKeys : list , optional
2119
- The list of dictionary keys to use to index the edge features. The length of this list must match the length of edge features. The default is [].
2119
+ The list of dictionary keys to use to index the edge features. The length of this list must match the length of edge features. Default is [].
2120
2120
  nodeIDHeader : str , optional
2121
- The column header string used to specify the id of nodes. The default is "node_id".
2121
+ The column header string used to specify the id of nodes. Default is "node_id".
2122
2122
  nodeLabelHeader : str , optional
2123
- The column header string used to specify the label of nodes. The default is "label".
2123
+ The column header string used to specify the label of nodes. Default is "label".
2124
2124
  nodeTrainMaskHeader : str , optional
2125
- The column header string used to specify the train mask of nodes. The default is "train_mask".
2125
+ The column header string used to specify the train mask of nodes. Default is "train_mask".
2126
2126
  nodeValidateMaskHeader : str , optional
2127
- The column header string used to specify the validate mask of nodes. The default is "val_mask".
2127
+ The column header string used to specify the validate mask of nodes. Default is "val_mask".
2128
2128
  nodeTestMaskHeader : str , optional
2129
- The column header string used to specify the test mask of nodes. The default is "test_mask".
2129
+ The column header string used to specify the test mask of nodes. Default is "test_mask".
2130
2130
  nodeFeaturesHeader : str , optional
2131
- The column header string used to specify the features of nodes. The default is "feat".
2131
+ The column header string used to specify the features of nodes. Default is "feat".
2132
2132
  nodeXHeader : str , optional
2133
- The column header string used to specify the X coordinate of nodes. The default is "X".
2133
+ The column header string used to specify the X coordinate of nodes. Default is "X".
2134
2134
  nodeYHeader : str , optional
2135
- The column header string used to specify the Y coordinate of nodes. The default is "Y".
2135
+ The column header string used to specify the Y coordinate of nodes. Default is "Y".
2136
2136
  nodeZHeader : str , optional
2137
- The column header string used to specify the Z coordinate of nodes. The default is "Z".
2137
+ The column header string used to specify the Z coordinate of nodes. Default is "Z".
2138
2138
  tolerance : float , optional
2139
- The desired tolerance. The default is 0.0001.
2139
+ The desired tolerance. Default is 0.0001.
2140
2140
  silent : bool , optional
2141
- If set to True, error and warning messages are suppressed. The default is False.
2141
+ If set to True, error and warning messages are suppressed. Default is False.
2142
2142
 
2143
2143
  Returns
2144
2144
  -------
@@ -2398,9 +2398,9 @@ class Graph:
2398
2398
  file : file object
2399
2399
  The input file.
2400
2400
  key : str , optional
2401
- The desired key for storing the node label. The default is "label".
2401
+ The desired key for storing the node label. Default is "label".
2402
2402
  tolerance : float , optional
2403
- The desired tolerance. The default is 0.0001.
2403
+ The desired tolerance. Default is 0.0001.
2404
2404
 
2405
2405
  Returns
2406
2406
  -------
@@ -2426,9 +2426,9 @@ class Graph:
2426
2426
  path : str
2427
2427
  The input file path.
2428
2428
  key : str , optional
2429
- The desired key for storing the node label. The default is "label".
2429
+ The desired key for storing the node label. Default is "label".
2430
2430
  tolerance : str , optional
2431
- The desired tolerance. The default is 0.0001.
2431
+ The desired tolerance. Default is 0.0001.
2432
2432
 
2433
2433
  Returns
2434
2434
  -------
@@ -2456,9 +2456,9 @@ class Graph:
2456
2456
  string : str
2457
2457
  The input string.
2458
2458
  key : str , optional
2459
- The desired key for storing the node label. The default is "label".
2459
+ The desired key for storing the node label. Default is "label".
2460
2460
  tolerance : float , optional
2461
- The desired tolerance. The default is 0.0001.
2461
+ The desired tolerance. Default is 0.0001.
2462
2462
 
2463
2463
  Returns
2464
2464
  -------
@@ -2534,35 +2534,35 @@ class Graph:
2534
2534
  file : file
2535
2535
  The input IFC file
2536
2536
  includeTypes : list , optional
2537
- A list of IFC object types to include in the graph. The default is [] which means all object types are included.
2537
+ A list of IFC object types to include in the graph. Default is [] which means all object types are included.
2538
2538
  excludeTypes : list , optional
2539
- A list of IFC object types to exclude from the graph. The default is [] which mean no object type is excluded.
2539
+ A list of IFC object types to exclude from the graph. Default is [] which mean no object type is excluded.
2540
2540
  includeRels : list , optional
2541
- A list of IFC relationship types to include in the graph. The default is [] which means all relationship types are included.
2541
+ A list of IFC relationship types to include in the graph. Default is [] which means all relationship types are included.
2542
2542
  excludeRels : list , optional
2543
- A list of IFC relationship types to exclude from the graph. The default is [] which mean no relationship type is excluded.
2543
+ A list of IFC relationship types to exclude from the graph. Default is [] which mean no relationship type is excluded.
2544
2544
  transferDictionaries : bool , optional
2545
- NOT USED. If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. The default is False.
2545
+ NOT USED. If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. Default is False.
2546
2546
  useInternalVertex : bool , optional
2547
- If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. The default is False.
2547
+ If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. Default is False.
2548
2548
  storeBREP : bool , optional
2549
- If set to True, store the BRep of the subtopology in its representative vertex. The default is False.
2549
+ If set to True, store the BRep of the subtopology in its representative vertex. Default is False.
2550
2550
  removeCoplanarFaces : bool , optional
2551
- If set to True, coplanar faces are removed. Otherwise they are not. The default is False.
2551
+ If set to True, coplanar faces are removed. Otherwise they are not. Default is False.
2552
2552
  xMin : float, optional
2553
- The desired minimum value to assign for a vertex's X coordinate. The default is -0.5.
2553
+ The desired minimum value to assign for a vertex's X coordinate. Default is -0.5.
2554
2554
  yMin : float, optional
2555
- The desired minimum value to assign for a vertex's Y coordinate. The default is -0.5.
2555
+ The desired minimum value to assign for a vertex's Y coordinate. Default is -0.5.
2556
2556
  zMin : float, optional
2557
- The desired minimum value to assign for a vertex's Z coordinate. The default is -0.5.
2557
+ The desired minimum value to assign for a vertex's Z coordinate. Default is -0.5.
2558
2558
  xMax : float, optional
2559
- The desired maximum value to assign for a vertex's X coordinate. The default is 0.5.
2559
+ The desired maximum value to assign for a vertex's X coordinate. Default is 0.5.
2560
2560
  yMax : float, optional
2561
- The desired maximum value to assign for a vertex's Y coordinate. The default is 0.5.
2561
+ The desired maximum value to assign for a vertex's Y coordinate. Default is 0.5.
2562
2562
  zMax : float, optional
2563
- The desired maximum value to assign for a vertex's Z coordinate. The default is 0.5.
2563
+ The desired maximum value to assign for a vertex's Z coordinate. Default is 0.5.
2564
2564
  tolerance : float , optional
2565
- The desired tolerance. The default is 0.0001.
2565
+ The desired tolerance. Default is 0.0001.
2566
2566
 
2567
2567
  Returns
2568
2568
  -------
@@ -2729,35 +2729,35 @@ class Graph:
2729
2729
  file : file
2730
2730
  The input IFC file
2731
2731
  includeTypes : list , optional
2732
- A list of IFC object types to include in the graph. The default is [] which means all object types are included.
2732
+ A list of IFC object types to include in the graph. Default is [] which means all object types are included.
2733
2733
  excludeTypes : list , optional
2734
- A list of IFC object types to exclude from the graph. The default is [] which mean no object type is excluded.
2734
+ A list of IFC object types to exclude from the graph. Default is [] which mean no object type is excluded.
2735
2735
  includeRels : list , optional
2736
- A list of IFC relationship types to include in the graph. The default is [] which means all relationship types are included.
2736
+ A list of IFC relationship types to include in the graph. Default is [] which means all relationship types are included.
2737
2737
  excludeRels : list , optional
2738
- A list of IFC relationship types to exclude from the graph. The default is [] which mean no relationship type is excluded.
2738
+ A list of IFC relationship types to exclude from the graph. Default is [] which mean no relationship type is excluded.
2739
2739
  transferDictionaries : bool , optional
2740
- If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. The default is False.
2740
+ If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. Default is False.
2741
2741
  useInternalVertex : bool , optional
2742
- If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. The default is False.
2742
+ If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. Default is False.
2743
2743
  storeBREP : bool , optional
2744
- If set to True, store the BRep of the subtopology in its representative vertex. The default is False.
2744
+ If set to True, store the BRep of the subtopology in its representative vertex. Default is False.
2745
2745
  removeCoplanarFaces : bool , optional
2746
- If set to True, coplanar faces are removed. Otherwise they are not. The default is False.
2746
+ If set to True, coplanar faces are removed. Otherwise they are not. Default is False.
2747
2747
  xMin : float, optional
2748
- The desired minimum value to assign for a vertex's X coordinate. The default is -0.5.
2748
+ The desired minimum value to assign for a vertex's X coordinate. Default is -0.5.
2749
2749
  yMin : float, optional
2750
- The desired minimum value to assign for a vertex's Y coordinate. The default is -0.5.
2750
+ The desired minimum value to assign for a vertex's Y coordinate. Default is -0.5.
2751
2751
  zMin : float, optional
2752
- The desired minimum value to assign for a vertex's Z coordinate. The default is -0.5.
2752
+ The desired minimum value to assign for a vertex's Z coordinate. Default is -0.5.
2753
2753
  xMax : float, optional
2754
- The desired maximum value to assign for a vertex's X coordinate. The default is 0.5.
2754
+ The desired maximum value to assign for a vertex's X coordinate. Default is 0.5.
2755
2755
  yMax : float, optional
2756
- The desired maximum value to assign for a vertex's Y coordinate. The default is 0.5.
2756
+ The desired maximum value to assign for a vertex's Y coordinate. Default is 0.5.
2757
2757
  zMax : float, optional
2758
- The desired maximum value to assign for a vertex's Z coordinate. The default is 0.5.
2758
+ The desired maximum value to assign for a vertex's Z coordinate. Default is 0.5.
2759
2759
  tolerance : float , optional
2760
- The desired tolerance. The default is 0.0001.
2760
+ The desired tolerance. Default is 0.0001.
2761
2761
 
2762
2762
  Returns
2763
2763
  -------
@@ -3154,33 +3154,33 @@ class Graph:
3154
3154
  path : str
3155
3155
  The input IFC file path.
3156
3156
  includeTypes : list , optional
3157
- A list of IFC object types to include in the graph. The default is [] which means all object types are included.
3157
+ A list of IFC object types to include in the graph. Default is [] which means all object types are included.
3158
3158
  excludeTypes : list , optional
3159
- A list of IFC object types to exclude from the graph. The default is [] which mean no object type is excluded.
3159
+ A list of IFC object types to exclude from the graph. Default is [] which mean no object type is excluded.
3160
3160
  includeRels : list , optional
3161
- A list of IFC relationship types to include in the graph. The default is [] which means all relationship types are included.
3161
+ A list of IFC relationship types to include in the graph. Default is [] which means all relationship types are included.
3162
3162
  excludeRels : list , optional
3163
- A list of IFC relationship types to exclude from the graph. The default is [] which mean no relationship type is excluded.
3163
+ A list of IFC relationship types to exclude from the graph. Default is [] which mean no relationship type is excluded.
3164
3164
  transferDictionaries : bool , optional
3165
- If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. The default is False.
3165
+ If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. Default is False.
3166
3166
  useInternalVertex : bool , optional
3167
- If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. The default is False.
3167
+ If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. Default is False.
3168
3168
  storeBREP : bool , optional
3169
- If set to True, store the BRep of the subtopology in its representative vertex. The default is False.
3169
+ If set to True, store the BRep of the subtopology in its representative vertex. Default is False.
3170
3170
  removeCoplanarFaces : bool , optional
3171
- If set to True, coplanar faces are removed. Otherwise they are not. The default is False.
3171
+ If set to True, coplanar faces are removed. Otherwise they are not. Default is False.
3172
3172
  xMin : float, optional
3173
- The desired minimum value to assign for a vertex's X coordinate. The default is -0.5.
3173
+ The desired minimum value to assign for a vertex's X coordinate. Default is -0.5.
3174
3174
  yMin : float, optional
3175
- The desired minimum value to assign for a vertex's Y coordinate. The default is -0.5.
3175
+ The desired minimum value to assign for a vertex's Y coordinate. Default is -0.5.
3176
3176
  zMin : float, optional
3177
- The desired minimum value to assign for a vertex's Z coordinate. The default is -0.5.
3177
+ The desired minimum value to assign for a vertex's Z coordinate. Default is -0.5.
3178
3178
  xMax : float, optional
3179
- The desired maximum value to assign for a vertex's X coordinate. The default is 0.5.
3179
+ The desired maximum value to assign for a vertex's X coordinate. Default is 0.5.
3180
3180
  yMax : float, optional
3181
- The desired maximum value to assign for a vertex's Y coordinate. The default is 0.5.
3181
+ The desired maximum value to assign for a vertex's Y coordinate. Default is 0.5.
3182
3182
  zMax : float, optional
3183
- The desired maximum value to assign for a vertex's Z coordinate. The default is 0.5.
3183
+ The desired maximum value to assign for a vertex's Z coordinate. Default is 0.5.
3184
3184
 
3185
3185
  Returns
3186
3186
  -------
@@ -3244,7 +3244,7 @@ class Graph:
3244
3244
  edgeDictionaries : list , optional
3245
3245
  The python dictionaries of the edges (in the same order as the list of edges).
3246
3246
  tolerance : float , optional
3247
- The desired tolerance. The default is 0.0001.
3247
+ The desired tolerance. Default is 0.0001.
3248
3248
 
3249
3249
  Returns
3250
3250
  -------
@@ -3296,17 +3296,17 @@ class Graph:
3296
3296
  nxGraph : NetworkX graph
3297
3297
  The input NetworkX graph.
3298
3298
  xKey : str , optional
3299
- The dictionary key under which to find the X-Coordinate of the vertex. The default is 'x'.
3299
+ The dictionary key under which to find the X-Coordinate of the vertex. Default is 'x'.
3300
3300
  yKey : str , optional
3301
- The dictionary key under which to find the Y-Coordinate of the vertex. The default is 'y'.
3301
+ The dictionary key under which to find the Y-Coordinate of the vertex. Default is 'y'.
3302
3302
  zKey : str , optional
3303
- The dictionary key under which to find the Z-Coordinate of the vertex. The default is 'z'.
3303
+ The dictionary key under which to find the Z-Coordinate of the vertex. Default is 'z'.
3304
3304
  range : tuple , optional
3305
- The range to use for position coordinates if no values are found in the dictionaries. The default is (-1,1)
3305
+ The range to use for position coordinates if no values are found in the dictionaries. Default is (-1,1)
3306
3306
  mantissa : int , optional
3307
- The desired length of the mantissa. The default is 6.
3307
+ The number of decimal places to round the result to. Default is 6.
3308
3308
  tolerance : float , optional
3309
- The desired tolerance. The default is 0.0001.
3309
+ The desired tolerance. Default is 0.0001.
3310
3310
 
3311
3311
  Returns
3312
3312
  -------
@@ -3387,25 +3387,25 @@ class Graph:
3387
3387
  topology : topologic_core.Topology
3388
3388
  The input topology.
3389
3389
  direct : bool , optional
3390
- If set to True, connect the subtopologies directly with a single edge. The default is True.
3390
+ If set to True, connect the subtopologies directly with a single edge. Default is True.
3391
3391
  directApertures : bool , optional
3392
- If set to True, connect the subtopologies directly with a single edge if they share one or more apertures. The default is False.
3392
+ If set to True, connect the subtopologies directly with a single edge if they share one or more apertures. Default is False.
3393
3393
  viaSharedTopologies : bool , optional
3394
- If set to True, connect the subtopologies via their shared topologies. The default is False.
3394
+ If set to True, connect the subtopologies via their shared topologies. Default is False.
3395
3395
  viaSharedApertures : bool , optional
3396
- If set to True, connect the subtopologies via their shared apertures. The default is False.
3396
+ If set to True, connect the subtopologies via their shared apertures. Default is False.
3397
3397
  toExteriorTopologies : bool , optional
3398
- If set to True, connect the subtopologies to their exterior topologies. The default is False.
3398
+ If set to True, connect the subtopologies to their exterior topologies. Default is False.
3399
3399
  toExteriorApertures : bool , optional
3400
- If set to True, connect the subtopologies to their exterior apertures. The default is False.
3400
+ If set to True, connect the subtopologies to their exterior apertures. Default is False.
3401
3401
  toContents : bool , optional
3402
- If set to True, connect the subtopologies to their contents. The default is False.
3402
+ If set to True, connect the subtopologies to their contents. Default is False.
3403
3403
  toOutposts : bool , optional
3404
- If set to True, connect the topology to the list specified in its outposts. The default is False.
3404
+ If set to True, connect the topology to the list specified in its outposts. Default is False.
3405
3405
  idKey : str , optional
3406
- The key to use to find outpost by ID. It is case insensitive. The default is "TOPOLOGIC_ID".
3406
+ The key to use to find outpost by ID. It is case insensitive. Default is "TOPOLOGIC_ID".
3407
3407
  outpostsKey : str , optional
3408
- The key to use to find the list of outposts. It is case insensitive. The default is "outposts".
3408
+ The key to use to find the list of outposts. It is case insensitive. Default is "outposts".
3409
3409
  vertexCategoryKey : str , optional
3410
3410
  The key under which to store the node type. Node categories are:
3411
3411
  0 : main topology
@@ -3427,11 +3427,11 @@ class Graph:
3427
3427
  6 : to outpost
3428
3428
  The default is "category".
3429
3429
  useInternalVertex : bool , optional
3430
- If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. The default is False.
3430
+ If set to True, use an internal vertex to represent the subtopology. Otherwise, use its centroid. Default is False.
3431
3431
  storeBREP : bool , optional
3432
- If set to True, store the BRep of the subtopology in its representative vertex. The default is False.
3432
+ If set to True, store the BRep of the subtopology in its representative vertex. Default is False.
3433
3433
  tolerance : float , optional
3434
- The desired tolerance. The default is 0.0001.
3434
+ The desired tolerance. Default is 0.0001.
3435
3435
 
3436
3436
  Returns
3437
3437
  -------
@@ -4585,26 +4585,26 @@ class Graph:
4585
4585
  graph : topologic_core.Graph
4586
4586
  The input graph.
4587
4587
  method : str , optional
4588
- The method of computing the betweenness centrality. The options are "vertex" or "edge". The default is "vertex".
4588
+ The method of computing the betweenness centrality. The options are "vertex" or "edge". Default is "vertex".
4589
4589
  weightKey : str , optional
4590
4590
  If specified, the value in the connected edges' dictionary specified by the weightKey string will be aggregated to calculate
4591
4591
  the shortest path. If a numeric value cannot be retrieved from an edge, a value of 1 is used instead.
4592
4592
  This is used in weighted graphs. if weightKey is set to "Length" or "Distance", the length of the edge will be used as its weight.
4593
4593
  normalize : bool , optional
4594
- If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. The default is False.
4594
+ If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. Default is False.
4595
4595
  nxCompatible : bool , optional
4596
- If set to True, and normalize input parameter is also set to True, the values are set to be identical to NetworkX values. Otherwise, they are normalized between 0 and 1. The default is False.
4596
+ If set to True, and normalize input parameter is also set to True, the values are set to be identical to NetworkX values. Otherwise, they are normalized between 0 and 1. Default is False.
4597
4597
  key : str , optional
4598
- The desired dictionary key under which to store the betweenness centrality score. The default is "betweenness_centrality".
4598
+ The desired dictionary key under which to store the betweenness centrality score. Default is "betweenness_centrality".
4599
4599
  colorKey : str , optional
4600
- The desired dictionary key under which to store the betweenness centrality color. The default is "betweenness_centrality".
4600
+ The desired dictionary key under which to store the betweenness centrality color. Default is "betweenness_centrality".
4601
4601
  colorScale : str , optional
4602
- The desired type of plotly color scales to use (e.g. "viridis", "plasma"). The default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
4602
+ The desired type of plotly color scales to use (e.g. "viridis", "plasma"). Default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
4603
4603
  In addition to these, three color-blind friendly scales are included. These are "protanopia", "deuteranopia", and "tritanopia" for red, green, and blue colorblindness respectively.
4604
4604
  mantissa : int , optional
4605
- The desired length of the mantissa. The default is 6.
4605
+ The number of decimal places to round the result to. Default is 6.
4606
4606
  tolerance : float , optional
4607
- The desired tolerance. The default is 0.0001.
4607
+ The desired tolerance. Default is 0.0001.
4608
4608
 
4609
4609
  Returns
4610
4610
  -------
@@ -4635,9 +4635,9 @@ class Graph:
4635
4635
  graph : topologic_core.Graph
4636
4636
  The input graph.
4637
4637
  maxColors : int , optional
4638
- The desired maximum number of colors to test against. The default is 3.
4638
+ The desired maximum number of colors to test against. Default is 3.
4639
4639
  silent : bool , optional
4640
- If set to True, error and warning messages are suppressed. The default is False.
4640
+ If set to True, error and warning messages are suppressed. Default is False.
4641
4641
 
4642
4642
  Returns
4643
4643
  -------
@@ -4701,13 +4701,13 @@ class Graph:
4701
4701
  graph : topologic_core.Graph
4702
4702
  The input graph.
4703
4703
  oldKey : str , optional
4704
- The existing dictionary key to use to read any pre-existing color information. The default is "color".
4704
+ The existing dictionary key to use to read any pre-existing color information. Default is "color".
4705
4705
  key : str , optional
4706
- The new dictionary key to use to write out new color information. The default is "color".
4706
+ The new dictionary key to use to write out new color information. Default is "color".
4707
4707
  maxColors : int , optional
4708
- The desired maximum number of colors to use. If set to None, the chromatic number of the graph is used. The default is None.
4708
+ The desired maximum number of colors to use. If set to None, the chromatic number of the graph is used. Default is None.
4709
4709
  tolerance : float , optional
4710
- The desired tolerance. The default is 0.0001.
4710
+ The desired tolerance. Default is 0.0001.
4711
4711
 
4712
4712
  Returns
4713
4713
  -------
@@ -4794,14 +4794,18 @@ class Graph:
4794
4794
  weightDiameter: float = 0.0,
4795
4795
  weightEigenVectorCentrality: float = 0.0,
4796
4796
  weightGlobalClusteringCoefficient: float = 0.0,
4797
+ weightHopper: float = 0.0,
4798
+ weightJaccard: float = 0.0,
4797
4799
  weightPageRank: float = 0.0,
4798
4800
  weightStructure: float = 0.0,
4799
4801
  weightWeisfeilerLehman: float = 0.0,
4800
- weightJaccard: float = 0.0,
4801
4802
  vertexIDKey: str = "id",
4802
4803
  edgeWeightKey: str = None,
4803
- vertexKey: str = None,
4804
+ wlKey: str = None,
4805
+ hopperKey: str = None,
4804
4806
  iterations: int = 2,
4807
+ maxHops: int = 2,
4808
+ decay: float = 0.5,
4805
4809
  mantissa: int = 6,
4806
4810
  silent: bool = False):
4807
4811
  """
@@ -4833,6 +4837,8 @@ class Graph:
4833
4837
  The desired weight for geometric similarity (vertex positions). Default is 0.0.
4834
4838
  weightGlobalClusteringCoefficient : float , optional
4835
4839
  The desired weight for global clustering coefficient similarity (graph-level and node-level). Default is 0.0.
4840
+ weightHopper : float , optional
4841
+ The desired weight for Hopper kernel similarity. Default is 0.0.
4836
4842
  weightJaccard: float , optional
4837
4843
  The desired weight for the Weighted Jaccard similarity. Default is 0.0.
4838
4844
  weightPageRank : float , optional
@@ -4841,21 +4847,26 @@ class Graph:
4841
4847
  The desired weight for structural similarity (number of vertices and edges). Default is 0.0.
4842
4848
  weightWeisfeilerLehman : float , optional
4843
4849
  The desired weight for Weisfeiler-Lehman kernel similarity (iterative label propagation). Default is 0.0.
4844
-
4845
4850
  vertexIDKey: str , optional
4846
- The dictionary key under which to find the unique vertex ID. The default is "id".
4851
+ The dictionary key under which to find the unique vertex ID. Default is "id".
4847
4852
  edgeWeightKey: str , optional
4848
4853
  The dictionary key under which to find the weight of the edge for weighted graphs.
4849
4854
  If this parameter is specified as "length" or "distance" then the length of the edge is used as its weight.
4850
4855
  The default is None which means all edges are treated as if they have a weight of 1.
4851
- vertexKey: str , optional
4852
- The vertex key to use for the Weifeiler-Lehman initial labels. The default is None which means it will use vertex degree as an initial label.
4856
+ wlKey: str , optional
4857
+ The vertex key to use for the Weifeiler-Lehman kernel initial labels. Default is None which means it will use vertex degree as an initial label.
4858
+ hopperKey: str , optional
4859
+ The vertex key to use for the Hopper kernel to derive node features. Default is None which means it will use vertex degree as an initial label.
4853
4860
  iterations : int , optional
4854
- The desired number of Weisfeiler-Lehman kernel iterations. Default is 2.
4861
+ WL kernel-specific parameter: The desired number of Weisfeiler-Lehman kernel iterations. Default is 2.
4862
+ maxHops : int , optional
4863
+ Hopper kernel-specific parameter: The maximum shortest-path hop distance to consider. Default is 3.
4864
+ decay : float , optional
4865
+ Hopper kernel-specific parameter: A per-hop geometric decay factor in the range (0, 1]. Default is 0.5.
4855
4866
  mantissa : int , optional
4856
- The desired length of the mantissa. The default is 6.
4867
+ The number of decimal places to round the result to. Default is 6.
4857
4868
  silent : bool , optional
4858
- If set to True, error and warning messages are suppressed. The default is False.
4869
+ If set to True, error and warning messages are suppressed. Default is False.
4859
4870
 
4860
4871
  Returns
4861
4872
  -------
@@ -4870,6 +4881,7 @@ class Graph:
4870
4881
  "eigenvector_centrality"
4871
4882
  "geometry"
4872
4883
  "global_clustering_coefficient"
4884
+ "hopper"
4873
4885
  "jaccard"
4874
4886
  "pagerank"
4875
4887
  "structure"
@@ -4932,15 +4944,13 @@ class Graph:
4932
4944
  graph2 : topologic Graph
4933
4945
  Second graph.
4934
4946
  vertexIDKey: str , optional
4935
- The dictionary key under which to find the unique vertex ID. The default is "id".
4947
+ The dictionary key under which to find the unique vertex ID. Default is "id".
4936
4948
  edgeWeightKey: str , optional
4937
4949
  The dictionary key under which to find the weight of the edge for weighted graphs.
4938
4950
  If this parameter is specified as "length" or "distance" then the length of the edge is used as its weight.
4939
4951
  The default is None which means all edges are treated as if they have a weight of 1.
4940
- iterations : int , optional
4941
- The desired number of Weisfeiler-Lehman iterations. Default is 2.
4942
4952
  mantissa : int , optional
4943
- The desired length of the mantissa. The default is 6.
4953
+ The number of decimal places to round the result to. Default is 6.
4944
4954
 
4945
4955
  Returns
4946
4956
  -------
@@ -5046,6 +5056,10 @@ class Graph:
5046
5056
  diff = abs(v1 - v2) / max(abs(v1), abs(v2), 1e-6)
5047
5057
  return round((1 - diff), mantissa)
5048
5058
 
5059
+ def hopper_similarity(graphA, graphB, key=None, maxHops=3, decay=0.5, mantissa=6, silent=False):
5060
+ score = Graph.HopperKernel(graphA, graphB, key=key, maxHops=maxHops, decay=decay, normalize=True, mantissa=mantissa, silent=silent)
5061
+ return score
5062
+
5049
5063
  def pagerank_similarity(graphA, graphB, mantissa=6):
5050
5064
  v1 = safe_mean(Graph.PageRank(graphA))
5051
5065
  v2 = safe_mean(Graph.PageRank(graphB))
@@ -5065,8 +5079,8 @@ class Graph:
5065
5079
 
5066
5080
  return round((vertex_score + edge_score) / 2, mantissa)
5067
5081
 
5068
- def weisfeiler_lehman_similarity(graphA, graphB, key=None, iterations=3, mantissa=6):
5069
- score = Graph.WLKernel(graphA, graphB, key=key, iterations=iterations, normalize=True, mantissa=mantissa)
5082
+ def weisfeiler_lehman_similarity(graphA, graphB, key=None, iterations=2, mantissa=6, silent=True):
5083
+ score = Graph.WLKernel(graphA, graphB, key=key, iterations=iterations, normalize=True, mantissa=mantissa, silent=silent)
5070
5084
  return score
5071
5085
 
5072
5086
  if not Topology.IsInstance(graphA, "graph"):
@@ -5087,23 +5101,25 @@ class Graph:
5087
5101
  weightDiameter,
5088
5102
  weightEigenVectorCentrality,
5089
5103
  weightGlobalClusteringCoefficient,
5104
+ weightHopper,
5090
5105
  weightPageRank,
5091
5106
  weightStructure,
5092
5107
  weightWeisfeilerLehman,
5093
5108
  weightJaccard])
5094
- accessibility_centrality_score = accessibility_centrality_similarity(graphA, graphB, mantissa=mantissa) if weightAccessibilityCentrality else 0
5095
- attribute_score = attribute_similarity(graphA, graphB, mantissa=mantissa) if weightAttributes else 0
5096
- betweenness_centrality_score = betweenness_centrality_similarity(graphA, graphB, mantissa=mantissa) if weightBetwennessCentrality else 0
5097
- closeness_centrality_score = closeness_centrality_similarity(graphA, graphB, mantissa=mantissa) if weightClosenessCentrality else 0
5098
- degree_centrality_score = degree_centrality_similarity(graphA, graphB, mantissa=mantissa) if weightDegreeCentrality else 0
5099
- diameter_score = diameter_similarity(graphA, graphB, mantissa=mantissa) if weightDiameter else 0
5100
- eigenvector_centrality_score = eigenvector_centrality_similarity(graphA, graphB, mantissa=mantissa) if weightEigenVectorCentrality else 0
5101
- global_clustering_coefficient_score = global_clustering_coefficient_similarity(graphA, graphB, mantissa=mantissa) if weightGlobalClusteringCoefficient else 0
5102
- geometry_score = geometry_similarity(graphA, graphB, mantissa=mantissa) if weightGeometry else 0
5103
- jaccard_score = weighted_jaccard_similarity(graphA, graphB, vertexIDKey=vertexIDKey, edgeWeightKey=edgeWeightKey, mantissa=mantissa) if weightJaccard else 0
5104
- pagerank_score = pagerank_similarity(graphA, graphB, mantissa=mantissa) if weightPageRank else 0
5105
- structure_score = structure_similarity(graphA, graphB, mantissa=mantissa) if weightStructure else 0
5106
- weisfeiler_lehman_score = weisfeiler_lehman_similarity(graphA, graphB, key=vertexKey, iterations=iterations, mantissa=mantissa) if weightWeisfeilerLehman else 0
5109
+ accessibility_centrality_score = accessibility_centrality_similarity(graphA, graphB, mantissa=6) if weightAccessibilityCentrality else 0
5110
+ attribute_score = attribute_similarity(graphA, graphB, mantissa=6) if weightAttributes else 0
5111
+ betweenness_centrality_score = betweenness_centrality_similarity(graphA, graphB, mantissa=6) if weightBetwennessCentrality else 0
5112
+ closeness_centrality_score = closeness_centrality_similarity(graphA, graphB, mantissa=6) if weightClosenessCentrality else 0
5113
+ degree_centrality_score = degree_centrality_similarity(graphA, graphB, mantissa=6) if weightDegreeCentrality else 0
5114
+ diameter_score = diameter_similarity(graphA, graphB, mantissa=6) if weightDiameter else 0
5115
+ eigenvector_centrality_score = eigenvector_centrality_similarity(graphA, graphB, mantissa=6) if weightEigenVectorCentrality else 0
5116
+ geometry_score = geometry_similarity(graphA, graphB, mantissa=6) if weightGeometry else 0
5117
+ global_clustering_coefficient_score = global_clustering_coefficient_similarity(graphA, graphB, mantissa=6) if weightGlobalClusteringCoefficient else 0
5118
+ hopper_score = hopper_similarity(graphA, graphB, key=hopperKey, maxHops=maxHops, decay=decay, mantissa=6, silent=silent) if weightHopper else 0
5119
+ jaccard_score = weighted_jaccard_similarity(graphA, graphB, vertexIDKey=vertexIDKey, edgeWeightKey=edgeWeightKey, mantissa=6) if weightJaccard else 0
5120
+ pagerank_score = pagerank_similarity(graphA, graphB, mantissa=6) if weightPageRank else 0
5121
+ structure_score = structure_similarity(graphA, graphB, mantissa=6) if weightStructure else 0
5122
+ weisfeiler_lehman_score = weisfeiler_lehman_similarity(graphA, graphB, key=wlKey, iterations=iterations, mantissa=6, silent=silent) if weightWeisfeilerLehman else 0
5107
5123
 
5108
5124
  weighted_sum = (
5109
5125
  accessibility_centrality_score * weightAccessibilityCentrality +
@@ -5115,6 +5131,7 @@ class Graph:
5115
5131
  eigenvector_centrality_score * weightEigenVectorCentrality +
5116
5132
  geometry_score * weightGeometry +
5117
5133
  global_clustering_coefficient_score * weightGlobalClusteringCoefficient +
5134
+ hopper_score * weightHopper +
5118
5135
  jaccard_score * weightJaccard +
5119
5136
  pagerank_score * weightPageRank +
5120
5137
  structure_score * weightStructure +
@@ -5135,6 +5152,7 @@ class Graph:
5135
5152
  "eigenvector_centrality": round(eigenvector_centrality_score, mantissa),
5136
5153
  "geometry": round(geometry_score, mantissa),
5137
5154
  "global_clustering_coefficient": round(global_clustering_coefficient_score, mantissa),
5155
+ "hopper": round(hopper_score, mantissa),
5138
5156
  "jaccard": round(jaccard_score, mantissa),
5139
5157
  "pagerank": round(pagerank_score, mantissa),
5140
5158
  "structure": round(structure_score, mantissa),
@@ -5152,9 +5170,9 @@ class Graph:
5152
5170
  graph : topologicpy.Graph
5153
5171
  The input topologic graph.
5154
5172
  tolerance : float , optional
5155
- The desired tolerance. The default is 0.0001.
5173
+ The desired tolerance. Default is 0.0001.
5156
5174
  silent : bool , optional
5157
- If set to True, error and warning messages are suppressed. The default is False.
5175
+ If set to True, error and warning messages are suppressed. Default is False.
5158
5176
 
5159
5177
  Returns
5160
5178
  -------
@@ -5228,9 +5246,9 @@ class Graph:
5228
5246
  graph : topologic_core.Graph
5229
5247
  The input graph.
5230
5248
  tolerance : float , optional
5231
- The desired tolerance. The default is 0.0001.
5249
+ The desired tolerance. Default is 0.0001.
5232
5250
  silent : bool , optional
5233
- If set to True, error and warning messages are suppressed. The default is False.
5251
+ If set to True, error and warning messages are suppressed. Default is False.
5234
5252
 
5235
5253
  Returns
5236
5254
  -------
@@ -5270,11 +5288,11 @@ class Graph:
5270
5288
  graph : topologic_core.Graph
5271
5289
  The input graph.
5272
5290
  key : str , optional
5273
- The vertex and edge dictionary key under which to store the component number. The default is "component".
5291
+ The vertex and edge dictionary key under which to store the component number. Default is "component".
5274
5292
  tolerance : float , optional
5275
- The desired tolerance. The default is 0.0001.
5293
+ The desired tolerance. Default is 0.0001.
5276
5294
  silent : bool , optional
5277
- If set to True, error and warning messages are suppressed. The default is False.
5295
+ If set to True, error and warning messages are suppressed. Default is False.
5278
5296
 
5279
5297
  Returns
5280
5298
  -------
@@ -5361,9 +5379,9 @@ class Graph:
5361
5379
  edge : topologic_core.Edge
5362
5380
  The input graph edge that needs to be contracted.
5363
5381
  vertex : topollogic.Vertex , optional
5364
- The vertex to replace the contracted edge. If set to None, the centroid of the edge is chosen. The default is None.
5382
+ The vertex to replace the contracted edge. If set to None, the centroid of the edge is chosen. Default is None.
5365
5383
  tolerance : float , optional
5366
- The desired tolerance. The default is 0.0001.
5384
+ The desired tolerance. Default is 0.0001.
5367
5385
 
5368
5386
  Returns
5369
5387
  -------
@@ -5491,11 +5509,11 @@ class Graph:
5491
5509
  colorScale : str , optional
5492
5510
  Plotly color scale name (e.g., "viridis", "plasma").
5493
5511
  mantissa : int , optional
5494
- The desired length of the mantissa. The default is 6.
5512
+ The number of decimal places to round the result to. Default is 6.
5495
5513
  tolerance : float , optional
5496
- The desired tolerance. The default is 0.0001.
5514
+ The desired tolerance. Default is 0.0001.
5497
5515
  silent : bool , optional
5498
- If set to True, error and warning messages are suppressed. The default is False.
5516
+ If set to True, error and warning messages are suppressed. Default is False.
5499
5517
 
5500
5518
  Returns
5501
5519
  -------
@@ -5614,13 +5632,13 @@ class Graph:
5614
5632
  graph : topologicp.Graph
5615
5633
  The input topologic graph.
5616
5634
  key : str , optional
5617
- The dictionary key under which to store the partition number. The default is "partition".
5635
+ The dictionary key under which to store the partition number. Default is "partition".
5618
5636
  mantissa : int , optional
5619
- The desired length of the mantissa. The default is 6.
5637
+ The number of decimal places to round the result to. Default is 6.
5620
5638
  tolerance : float , optional
5621
- The desired tolerance. The default is 0.0001.
5639
+ The desired tolerance. Default is 0.0001.
5622
5640
  silent : bool , optional
5623
- If set to True, error and warning messages are suppressed. The default is False.
5641
+ If set to True, error and warning messages are suppressed. Default is False.
5624
5642
  Returns
5625
5643
  -------
5626
5644
  topologicpy.Graph
@@ -5641,13 +5659,13 @@ class Graph:
5641
5659
  graph : topologicp.Graph
5642
5660
  The input topologic graph.
5643
5661
  key : str , optional
5644
- The dictionary key under which to store the partition number. The default is "partition".
5662
+ The dictionary key under which to store the partition number. Default is "partition".
5645
5663
  mantissa : int , optional
5646
- The desired length of the mantissa. The default is 6.
5664
+ The number of decimal places to round the result to. Default is 6.
5647
5665
  tolerance : float , optional
5648
- The desired tolerance. The default is 0.0001.
5666
+ The desired tolerance. Default is 0.0001.
5649
5667
  silent : bool , optional
5650
- If set to True, error and warning messages are suppressed. The default is False.
5668
+ If set to True, error and warning messages are suppressed. Default is False.
5651
5669
  Returns
5652
5670
  -------
5653
5671
  topologicpy.Graph
@@ -5736,7 +5754,7 @@ class Graph:
5736
5754
  verticesB : topologic_core.Vertex
5737
5755
  The second list of input vertices.
5738
5756
  tolerance : float , optional
5739
- The desired tolerance. The default is 0.0001.
5757
+ The desired tolerance. Default is 0.0001.
5740
5758
 
5741
5759
  Returns
5742
5760
  -------
@@ -5779,26 +5797,26 @@ class Graph:
5779
5797
  graph : topologic_core.Graph
5780
5798
  The input graph.
5781
5799
  vertices : list , optional
5782
- The input list of vertices. The default is None which means all graph vertices are computed.
5800
+ The input list of vertices. Default is None which means all graph vertices are computed.
5783
5801
  normalize : bool , optional
5784
- If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. The default is False.
5802
+ If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. Default is False.
5785
5803
  weightKey : str , optional
5786
5804
  If specified, the value in the connected edges' dictionary specified by the weightKey string will be aggregated to calculate
5787
5805
  the vertex degree. If a numeric value cannot be retrieved from an edge, a value of 1 is used instead.
5788
5806
  This is used in weighted graphs. if weightKey is set to "Length" or "Distance", the length of the edge will be used as its weight.
5789
5807
  key : str , optional
5790
- The dictionary key under which to store the connectivity score. The default is "connectivity".
5808
+ The dictionary key under which to store the connectivity score. Default is "connectivity".
5791
5809
  colorKey : str , optional
5792
- The desired dictionary key under which to store the connectivity color. The default is "cn_color".
5810
+ The desired dictionary key under which to store the connectivity color. Default is "cn_color".
5793
5811
  colorScale : str , optional
5794
- The desired type of plotly color scales to use (e.g. "viridis", "plasma"). The default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
5812
+ The desired type of plotly color scales to use (e.g. "viridis", "plasma"). Default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
5795
5813
  In addition to these, three color-blind friendly scales are included. These are "protanopia", "deuteranopia", and "tritanopia" for red, green, and blue colorblindness respectively.
5796
5814
  mantissa : int , optional
5797
- The desired length of the mantissa. The default is 6.
5815
+ The number of decimal places to round the result to. Default is 6.
5798
5816
  tolerance : float , optional
5799
- The desired tolerance. The default is 0.0001.
5817
+ The desired tolerance. Default is 0.0001.
5800
5818
  silent : bool , optional
5801
- If set to True, error and warning messages are suppressed. The default is False.
5819
+ If set to True, error and warning messages are suppressed. Default is False.
5802
5820
 
5803
5821
  Returns
5804
5822
  -------
@@ -5829,7 +5847,7 @@ class Graph:
5829
5847
  edge : topologic_core.Edge
5830
5848
  The input edge.
5831
5849
  tolerance : float , optional
5832
- The desired tolerance. The default is 0.0001.
5850
+ The desired tolerance. Default is 0.0001.
5833
5851
 
5834
5852
  Returns
5835
5853
  -------
@@ -5859,7 +5877,7 @@ class Graph:
5859
5877
  vertex : topologic_core.Vertex
5860
5878
  The input Vertex.
5861
5879
  tolerance : float , optional
5862
- Ther desired tolerance. The default is 0.0001.
5880
+ Ther desired tolerance. Default is 0.0001.
5863
5881
 
5864
5882
  Returns
5865
5883
  -------
@@ -5887,9 +5905,9 @@ class Graph:
5887
5905
  graph : topologic_core.Graph
5888
5906
  The input graph.
5889
5907
  key : str , optional
5890
- The vertex dictionary key under which to store the cut status. 0 means the vertex is NOT a cut vertex. 1 means that the vertex IS a cut vertex. The default is "cut".
5908
+ The vertex dictionary key under which to store the cut status. 0 means the vertex is NOT a cut vertex. 1 means that the vertex IS a cut vertex. Default is "cut".
5891
5909
  silent : bool , optional
5892
- If set to True, error and warning messages are suppressed. The default is False.
5910
+ If set to True, error and warning messages are suppressed. Default is False.
5893
5911
 
5894
5912
  Returns
5895
5913
  -------
@@ -5962,18 +5980,18 @@ class Graph:
5962
5980
  the vertex degree. If a numeric value cannot be retrieved from an edge, a value of 1 is used instead.
5963
5981
  This is used in weighted graphs. if weightKey is set to "Length" or "Distance", the length of the edge will be used as its weight.
5964
5982
  normalize : bool , optional
5965
- If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. The default is False.
5983
+ If set to True, the values are normalized to be in the range 0 to 1. Otherwise they are not. Default is False.
5966
5984
  key : str , optional
5967
- The desired dictionary key under which to store the degree centrality score. The default is "degree_centrality".
5985
+ The desired dictionary key under which to store the degree centrality score. Default is "degree_centrality".
5968
5986
  colorKey : str , optional
5969
- The desired dictionary key under which to store the degree centrality color. The default is "dc_color".
5987
+ The desired dictionary key under which to store the degree centrality color. Default is "dc_color".
5970
5988
  colorScale : str , optional
5971
- The desired type of plotly color scales to use (e.g. "viridis", "plasma"). The default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
5989
+ The desired type of plotly color scales to use (e.g. "viridis", "plasma"). Default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
5972
5990
  In addition to these, three color-blind friendly scales are included. These are "protanopia", "deuteranopia", and "tritanopia" for red, green, and blue colorblindness respectively.
5973
5991
  mantissa : int , optional
5974
- The desired length of the mantissa. The default is 6.
5992
+ The number of decimal places to round the result to. Default is 6.
5975
5993
  tolerance : float , optional
5976
- The desired tolerance. The default is 0.0001.
5994
+ The desired tolerance. Default is 0.0001.
5977
5995
 
5978
5996
  Returns
5979
5997
  -------
@@ -6095,11 +6113,11 @@ class Graph:
6095
6113
  graph : topologic_core.Graph
6096
6114
  The input graph.
6097
6115
  vertex : topologic_core.Vertex , optional
6098
- The input root vertex. If not set, the first vertex in the graph is set as the root vertex. The default is None.
6116
+ The input root vertex. If not set, the first vertex in the graph is set as the root vertex. Default is None.
6099
6117
  tolerance : float , optional
6100
- The desired tolerance. The default is 0.0001.
6118
+ The desired tolerance. Default is 0.0001.
6101
6119
  silent : bool , optional
6102
- If set to True, error and warning messages are suppressed. The default is False.
6120
+ If set to True, error and warning messages are suppressed. Default is False.
6103
6121
 
6104
6122
  Returns
6105
6123
  -------
@@ -6149,15 +6167,15 @@ class Graph:
6149
6167
  graph : topologic_core.Graph
6150
6168
  The input graph.
6151
6169
  vertices : list , optional
6152
- The input list of vertices. The default is None.
6170
+ The input list of vertices. Default is None.
6153
6171
  key : str , optional
6154
- The dictionary key under which to store the depth score. The default is "depth".
6172
+ The dictionary key under which to store the depth score. Default is "depth".
6155
6173
  type : str , optional
6156
- The type of depth distance to calculate. The options are "topological" or "metric". The default is "topological". See https://www.spacesyntax.online/overview-2/analysis-of-spatial-relations/.
6174
+ The type of depth distance to calculate. The options are "topological" or "metric". Default is "topological". See https://www.spacesyntax.online/overview-2/analysis-of-spatial-relations/.
6157
6175
  mantissa : int , optional
6158
- The desired length of the mantissa. The default is 6.
6176
+ The number of decimal places to round the result to. Default is 6.
6159
6177
  tolerance : float , optional
6160
- The desired tolerance. The default is 0.0001.
6178
+ The desired tolerance. Default is 0.0001.
6161
6179
 
6162
6180
  Returns
6163
6181
  -------
@@ -6281,11 +6299,11 @@ class Graph:
6281
6299
  vertexB : topologic_core.Vertex
6282
6300
  The second input vertex.
6283
6301
  type : str , optional
6284
- The type of depth distance to calculate. The options are "topological" or "metric". The default is "topological". See https://www.spacesyntax.online/overview-2/analysis-of-spatial-relations/.
6302
+ The type of depth distance to calculate. The options are "topological" or "metric". Default is "topological". See https://www.spacesyntax.online/overview-2/analysis-of-spatial-relations/.
6285
6303
  mantissa : int , optional
6286
- The desired length of the mantissa. The default is 6.
6304
+ The number of decimal places to round the result to. Default is 6.
6287
6305
  tolerance : float , optional
6288
- The desired tolerance. The default is 0.0001.
6306
+ The desired tolerance. Default is 0.0001.
6289
6307
 
6290
6308
  Returns
6291
6309
  -------
@@ -6325,7 +6343,7 @@ class Graph:
6325
6343
  vertexB : topologic_core.Vertex
6326
6344
  The second input Vertex.
6327
6345
  tolerance : float , optional
6328
- The desired tolerance. The default is 0.0001.
6346
+ The desired tolerance. Default is 0.0001.
6329
6347
 
6330
6348
  Returns
6331
6349
  -------
@@ -6358,7 +6376,7 @@ class Graph:
6358
6376
  vertices : list , optional
6359
6377
  An optional list of vertices to restrict the returned list of edges only to those connected to this list.
6360
6378
  tolerance : float , optional
6361
- The desired tolerance. The default is 0.0001.
6379
+ The desired tolerance. Default is 0.0001.
6362
6380
 
6363
6381
  Returns
6364
6382
  -------
@@ -6398,11 +6416,11 @@ class Graph:
6398
6416
  weightKey : str, optional
6399
6417
  Ignored in this implementation. Reserved for future use if weighted adjacency matrix is desired.
6400
6418
  normalize : bool, optional
6401
- If set to True, the centrality values are normalized to be in the range 0 to 1. The default is False.
6419
+ If set to True, the centrality values are normalized to be in the range 0 to 1. Default is False.
6402
6420
  key : str, optional
6403
- The desired dictionary key under which to store the eigenvector centrality score. The default is "eigen_vector_centrality".
6421
+ The desired dictionary key under which to store the eigenvector centrality score. Default is "eigen_vector_centrality".
6404
6422
  colorKey : str, optional
6405
- The desired dictionary key under which to store the eigenvector centrality color. The default is "evc_color".
6423
+ The desired dictionary key under which to store the eigenvector centrality color. Default is "evc_color".
6406
6424
  colorScale : str, optional
6407
6425
  The desired type of Plotly color scale to use (e.g., "viridis", "plasma"). Default is "viridis".
6408
6426
  For a full list of names, see https://plotly.com/python/builtin-colorscales/.
@@ -6552,32 +6570,32 @@ class Graph:
6552
6570
  trix : Trix , RDF/XML-like format for RDF quads
6553
6571
  nquads : N-Quads , N-Triples-like format for RDF quads
6554
6572
  overwrite : bool , optional
6555
- If set to True, any existing file is overwritten. Otherwise, it is not. The default is False.
6573
+ If set to True, any existing file is overwritten. Otherwise, it is not. Default is False.
6556
6574
  bidirectional : bool , optional
6557
- If set to True, reverse relationships are created wherever possible. Otherwise, they are not. The default is False.
6575
+ If set to True, reverse relationships are created wherever possible. Otherwise, they are not. Default is False.
6558
6576
  includeAttributes : bool , optional
6559
- If set to True, the attributes associated with vertices in the graph are written out. Otherwise, they are not. The default is False.
6577
+ If set to True, the attributes associated with vertices in the graph are written out. Otherwise, they are not. Default is False.
6560
6578
  includeLabel : bool , optional
6561
- If set to True, a label is attached to each node. Otherwise, it is not. The default is False.
6579
+ If set to True, a label is attached to each node. Otherwise, it is not. Default is False.
6562
6580
  includeGeometry : bool , optional
6563
- If set to True, the geometry associated with vertices in the graph are written out. Otherwise, they are not. The default is False.
6581
+ If set to True, the geometry associated with vertices in the graph are written out. Otherwise, they are not. Default is False.
6564
6582
  siteLabel : str , optional
6565
- The desired site label. The default is "Site_0001".
6583
+ The desired site label. Default is "Site_0001".
6566
6584
  siteDictionary : dict , optional
6567
- The dictionary of site attributes to include in the output. The default is None.
6585
+ The dictionary of site attributes to include in the output. Default is None.
6568
6586
  buildingLabel : str , optional
6569
- The desired building label. The default is "Building_0001".
6587
+ The desired building label. Default is "Building_0001".
6570
6588
  buildingDictionary : dict , optional
6571
- The dictionary of building attributes to include in the output. The default is None.
6589
+ The dictionary of building attributes to include in the output. Default is None.
6572
6590
  storeyPrefix : str , optional
6573
- The desired prefixed to use for each building storey. The default is "Storey".
6591
+ The desired prefixed to use for each building storey. Default is "Storey".
6574
6592
  floorLevels : list , optional
6575
6593
  The list of floor levels. This should be a numeric list, sorted from lowest to highest.
6576
6594
  If not provided, floorLevels will be computed automatically based on the vertices' (zKey)) attribute. See below.
6577
6595
  verticesKey : str , optional
6578
- The desired key name to call vertices. The default is "vertices".
6596
+ The desired key name to call vertices. Default is "vertices".
6579
6597
  edgesKey : str , optional
6580
- The desired key name to call edges. The default is "edges".
6598
+ The desired key name to call edges. Default is "edges".
6581
6599
  vertexLabelKey : str , optional
6582
6600
  If set to a valid string, the vertex label will be set to the value at this key. Otherwise it will be set to Vertex_XXXX where XXXX is a sequential unique number.
6583
6601
  Note: If vertex labels are not unique, they will be forced to be unique.
@@ -6585,37 +6603,37 @@ class Graph:
6585
6603
  If set to a valid string, the edge label will be set to the value at this key. Otherwise it will be set to Edge_XXXX where XXXX is a sequential unique number.
6586
6604
  Note: If edge labels are not unique, they will be forced to be unique.
6587
6605
  sourceKey : str , optional
6588
- The dictionary key used to store the source vertex. The default is "source".
6606
+ The dictionary key used to store the source vertex. Default is "source".
6589
6607
  targetKey : str , optional
6590
- The dictionary key used to store the target vertex. The default is "target".
6608
+ The dictionary key used to store the target vertex. Default is "target".
6591
6609
  xKey : str , optional
6592
- The desired key name to use for x-coordinates. The default is "hasX".
6610
+ The desired key name to use for x-coordinates. Default is "hasX".
6593
6611
  yKey : str , optional
6594
- The desired key name to use for y-coordinates. The default is "hasY".
6612
+ The desired key name to use for y-coordinates. Default is "hasY".
6595
6613
  zKey : str , optional
6596
- The desired key name to use for z-coordinates. The default is "hasZ".
6614
+ The desired key name to use for z-coordinates. Default is "hasZ".
6597
6615
  geometryKey : str , optional
6598
- The desired key name to use for geometry. The default is "brep".
6616
+ The desired key name to use for geometry. Default is "brep".
6599
6617
  typeKey : str , optional
6600
- The dictionary key to use to look up the type of the node. The default is "type".
6618
+ The dictionary key to use to look up the type of the node. Default is "type".
6601
6619
  geometryKey : str , optional
6602
- The dictionary key to use to look up the geometry of the node. The default is "brep".
6620
+ The dictionary key to use to look up the geometry of the node. Default is "brep".
6603
6621
  spaceType : str , optional
6604
- The dictionary string value to use to look up vertices of type "space". The default is "space".
6622
+ The dictionary string value to use to look up vertices of type "space". Default is "space".
6605
6623
  wallType : str , optional
6606
- The dictionary string value to use to look up vertices of type "wall". The default is "wall".
6624
+ The dictionary string value to use to look up vertices of type "wall". Default is "wall".
6607
6625
  slabType : str , optional
6608
- The dictionary string value to use to look up vertices of type "slab". The default is "slab".
6626
+ The dictionary string value to use to look up vertices of type "slab". Default is "slab".
6609
6627
  doorType : str , optional
6610
- The dictionary string value to use to look up vertices of type "door". The default is "door".
6628
+ The dictionary string value to use to look up vertices of type "door". Default is "door".
6611
6629
  windowType : str , optional
6612
- The dictionary string value to use to look up vertices of type "window". The default is "window".
6630
+ The dictionary string value to use to look up vertices of type "window". Default is "window".
6613
6631
  contentType : str , optional
6614
- The dictionary string value to use to look up vertices of type "content". The default is "contents".
6632
+ The dictionary string value to use to look up vertices of type "content". Default is "contents".
6615
6633
  namespace : str , optional
6616
- The desired namespace to use in the BOT graph. The default is "http://github.com/wassimj/topologicpy/resources".
6634
+ The desired namespace to use in the BOT graph. Default is "http://github.com/wassimj/topologicpy/resources".
6617
6635
  mantissa : int , optional
6618
- The desired length of the mantissa. The default is 6.
6636
+ The number of decimal places to round the result to. Default is 6.
6619
6637
 
6620
6638
  Returns
6621
6639
  -------
@@ -6721,81 +6739,81 @@ class Graph:
6721
6739
  graphFeatures : str , optional
6722
6740
  The input graph features. This is a single string of numeric features separated by commas. Example: "3.456, 2.011, 56.4". The defauly is "".
6723
6741
  graphIDHeader : str , optional
6724
- The desired graph ID column header. The default is "graph_id".
6742
+ The desired graph ID column header. Default is "graph_id".
6725
6743
  graphLabelHeader : str , optional
6726
- The desired graph label column header. The default is "label".
6744
+ The desired graph label column header. Default is "label".
6727
6745
  graphFeaturesHeader : str , optional
6728
- The desired graph features column header. The default is "feat".
6746
+ The desired graph features column header. Default is "feat".
6729
6747
  edgeLabelKey : str , optional
6730
- The edge label dictionary key saved in each graph edge. The default is "label".
6748
+ The edge label dictionary key saved in each graph edge. Default is "label".
6731
6749
  defaultEdgeLabel : int , optional
6732
- The default edge label to use if no edge label is found. The default is 0.
6750
+ The default edge label to use if no edge label is found. Default is 0.
6733
6751
  edgeLabelHeader : str , optional
6734
- The desired edge label column header. The default is "label".
6752
+ The desired edge label column header. Default is "label".
6735
6753
  edgeSRCHeader : str , optional
6736
- The desired edge source column header. The default is "src_id".
6754
+ The desired edge source column header. Default is "src_id".
6737
6755
  edgeDSTHeader : str , optional
6738
- The desired edge destination column header. The default is "dst_id".
6756
+ The desired edge destination column header. Default is "dst_id".
6739
6757
  edgeFeaturesHeader : str , optional
6740
- The desired edge features column header. The default is "feat".
6758
+ The desired edge features column header. Default is "feat".
6741
6759
  edgeFeaturesKeys : list , optional
6742
- The list of feature dictionary keys saved in the dicitonaries of edges. The default is [].
6760
+ The list of feature dictionary keys saved in the dicitonaries of edges. Default is [].
6743
6761
  edgeTrainMaskHeader : str , optional
6744
- The desired edge train mask column header. The default is "train_mask".
6762
+ The desired edge train mask column header. Default is "train_mask".
6745
6763
  edgeValidateMaskHeader : str , optional
6746
- The desired edge validate mask column header. The default is "val_mask".
6764
+ The desired edge validate mask column header. Default is "val_mask".
6747
6765
  edgeTestMaskHeader : str , optional
6748
- The desired edge test mask column header. The default is "test_mask".
6766
+ The desired edge test mask column header. Default is "test_mask".
6749
6767
  edgeMaskKey : str , optional
6750
6768
  The dictionary key where the edge train, validate, test category is to be found. The value should be 0 for train
6751
- 1 for validate, and 2 for test. If no key is found, the ratio of train/validate/test will be used. The default is "mask".
6769
+ 1 for validate, and 2 for test. If no key is found, the ratio of train/validate/test will be used. Default is "mask".
6752
6770
  edgeTrainRatio : float , optional
6753
- The desired ratio of the edge data to use for training. The number must be between 0 and 1. The default is 0.8 which means 80% of the data will be used for training.
6771
+ The desired ratio of the edge data to use for training. The number must be between 0 and 1. Default is 0.8 which means 80% of the data will be used for training.
6754
6772
  This value is ignored if an edgeMaskKey is foud.
6755
6773
  edgeValidateRatio : float , optional
6756
- The desired ratio of the edge data to use for validation. The number must be between 0 and 1. The default is 0.1 which means 10% of the data will be used for validation.
6774
+ The desired ratio of the edge data to use for validation. The number must be between 0 and 1. Default is 0.1 which means 10% of the data will be used for validation.
6757
6775
  This value is ignored if an edgeMaskKey is foud.
6758
6776
  edgeTestRatio : float , optional
6759
- The desired ratio of the edge data to use for testing. The number must be between 0 and 1. The default is 0.1 which means 10% of the data will be used for testing.
6777
+ The desired ratio of the edge data to use for testing. The number must be between 0 and 1. Default is 0.1 which means 10% of the data will be used for testing.
6760
6778
  This value is ignored if an edgeMaskKey is foud.
6761
6779
  bidirectional : bool , optional
6762
- If set to True, a reversed edge will also be saved for each edge in the graph. Otherwise, it will not. The default is True.
6780
+ If set to True, a reversed edge will also be saved for each edge in the graph. Otherwise, it will not. Default is True.
6763
6781
  nodeFeaturesKeys : list , optional
6764
- The list of features keys saved in the dicitonaries of nodes. The default is [].
6782
+ The list of features keys saved in the dicitonaries of nodes. Default is [].
6765
6783
  nodeLabelKey : str , optional
6766
- The node label dictionary key saved in each graph vertex. The default is "label".
6784
+ The node label dictionary key saved in each graph vertex. Default is "label".
6767
6785
  defaultNodeLabel : int , optional
6768
- The default node label to use if no node label is found. The default is 0.
6786
+ The default node label to use if no node label is found. Default is 0.
6769
6787
  nodeIDHeader : str , optional
6770
- The desired node ID column header. The default is "node_id".
6788
+ The desired node ID column header. Default is "node_id".
6771
6789
  nodeLabelHeader : str , optional
6772
- The desired node label column header. The default is "label".
6790
+ The desired node label column header. Default is "label".
6773
6791
  nodeFeaturesHeader : str , optional
6774
- The desired node features column header. The default is "feat".
6792
+ The desired node features column header. Default is "feat".
6775
6793
  nodeTrainMaskHeader : str , optional
6776
- The desired node train mask column header. The default is "train_mask".
6794
+ The desired node train mask column header. Default is "train_mask".
6777
6795
  nodeValidateMaskHeader : str , optional
6778
- The desired node validate mask column header. The default is "val_mask".
6796
+ The desired node validate mask column header. Default is "val_mask".
6779
6797
  nodeTestMaskHeader : str , optional
6780
- The desired node test mask column header. The default is "test_mask".
6798
+ The desired node test mask column header. Default is "test_mask".
6781
6799
  nodeMaskKey : str , optional
6782
6800
  The dictionary key where the node train, validate, test category is to be found. The value should be 0 for train
6783
- 1 for validate, and 2 for test. If no key is found, the ratio of train/validate/test will be used. The default is "mask".
6801
+ 1 for validate, and 2 for test. If no key is found, the ratio of train/validate/test will be used. Default is "mask".
6784
6802
  nodeTrainRatio : float , optional
6785
- The desired ratio of the node data to use for training. The number must be between 0 and 1. The default is 0.8 which means 80% of the data will be used for training.
6803
+ The desired ratio of the node data to use for training. The number must be between 0 and 1. Default is 0.8 which means 80% of the data will be used for training.
6786
6804
  This value is ignored if an nodeMaskKey is foud.
6787
6805
  nodeValidateRatio : float , optional
6788
- The desired ratio of the node data to use for validation. The number must be between 0 and 1. The default is 0.1 which means 10% of the data will be used for validation.
6806
+ The desired ratio of the node data to use for validation. The number must be between 0 and 1. Default is 0.1 which means 10% of the data will be used for validation.
6789
6807
  This value is ignored if an nodeMaskKey is foud.
6790
6808
  nodeTestRatio : float , optional
6791
- The desired ratio of the node data to use for testing. The number must be between 0 and 1. The default is 0.1 which means 10% of the data will be used for testing.
6809
+ The desired ratio of the node data to use for testing. The number must be between 0 and 1. Default is 0.1 which means 10% of the data will be used for testing.
6792
6810
  This value is ignored if an nodeMaskKey is foud.
6793
6811
  mantissa : int , optional
6794
- The desired length of the mantissa. The default is 6.
6812
+ The number of decimal places to round the result to. Default is 6.
6795
6813
  tolerance : float , optional
6796
- The desired tolerance. The default is 0.0001.
6814
+ The desired tolerance. Default is 0.0001.
6797
6815
  overwrite : bool , optional
6798
- If set to True, any existing files are overwritten. Otherwise, the input list of graphs is appended to the end of each file. The default is False.
6816
+ If set to True, any existing files are overwritten. Otherwise, the input list of graphs is appended to the end of each file. Default is False.
6799
6817
 
6800
6818
  Returns
6801
6819
  -------
@@ -7079,45 +7097,45 @@ class Graph:
7079
7097
  path : str
7080
7098
  The desired path to the output folder where the graphs, edges, and nodes CSV files will be saved.
7081
7099
  graphWidth : float or int , optional
7082
- The desired graph width. The default is 20.
7100
+ The desired graph width. Default is 20.
7083
7101
  graphLength : float or int , optional
7084
- The desired graph length. The default is 20.
7102
+ The desired graph length. Default is 20.
7085
7103
  graphHeight : float or int , optional
7086
- The desired graph height. The default is 20.
7104
+ The desired graph height. Default is 20.
7087
7105
  defaultVertexColor : str , optional
7088
- The desired default vertex color. The default is "black".
7106
+ The desired default vertex color. Default is "black".
7089
7107
  defaultVertexSize : float or int , optional
7090
- The desired default vertex size. The default is 3.
7108
+ The desired default vertex size. Default is 3.
7091
7109
  defaultEdgeColor : str , optional
7092
- The desired default edge color. The default is "black".
7110
+ The desired default edge color. Default is "black".
7093
7111
  defaultEdgeWeight : float or int , optional
7094
- The desired default edge weight. The edge weight determines the width of the displayed edge. The default is 3.
7112
+ The desired default edge weight. The edge weight determines the width of the displayed edge. Default is 3.
7095
7113
  defaultEdgeType : str , optional
7096
- The desired default edge type. This can be one of "directed" or "undirected". The default is "undirected".
7114
+ The desired default edge type. This can be one of "directed" or "undirected". Default is "undirected".
7097
7115
  vertexLabelKey : str , optional
7098
7116
  If specified, the vertex dictionary is searched for this key to determine the vertex label. If not specified
7099
- the vertex label being is set to "Node X" where is X is a unique number. The default is None.
7117
+ the vertex label being is set to "Node X" where is X is a unique number. Default is None.
7100
7118
  vertexColorKey : str , optional
7101
7119
  If specified, the vertex dictionary is searched for this key to determine the vertex color. If not specified
7102
- the vertex color is set to the value defined by defaultVertexColor parameter. The default is None.
7120
+ the vertex color is set to the value defined by defaultVertexColor parameter. Default is None.
7103
7121
  vertexSizeKey : str , optional
7104
7122
  If specified, the vertex dictionary is searched for this key to determine the vertex size. If not specified
7105
- the vertex size is set to the value defined by defaultVertexSize parameter. The default is None.
7123
+ the vertex size is set to the value defined by defaultVertexSize parameter. Default is None.
7106
7124
  edgeLabelKey : str , optional
7107
7125
  If specified, the edge dictionary is searched for this key to determine the edge label. If not specified
7108
- the edge label being is set to "Edge X" where is X is a unique number. The default is None.
7126
+ the edge label being is set to "Edge X" where is X is a unique number. Default is None.
7109
7127
  edgeColorKey : str , optional
7110
7128
  If specified, the edge dictionary is searched for this key to determine the edge color. If not specified
7111
- the edge color is set to the value defined by defaultEdgeColor parameter. The default is None.
7129
+ the edge color is set to the value defined by defaultEdgeColor parameter. Default is None.
7112
7130
  edgeWeightKey : str , optional
7113
7131
  If specified, the edge dictionary is searched for this key to determine the edge weight. If not specified
7114
- the edge weight is set to the value defined by defaultEdgeWeight parameter. The default is None.
7132
+ the edge weight is set to the value defined by defaultEdgeWeight parameter. Default is None.
7115
7133
  overwrite : bool , optional
7116
- If set to True, any existing file is overwritten. Otherwise, it is not. The default is False.
7134
+ If set to True, any existing file is overwritten. Otherwise, it is not. Default is False.
7117
7135
  mantissa : int , optional
7118
- The desired length of the mantissa. The default is 6.
7136
+ The number of decimal places to round the result to. Default is 6.
7119
7137
  tolerance : float , optional
7120
- The desired tolerance. The default is 0.0001.
7138
+ The desired tolerance. Default is 0.0001.
7121
7139
 
7122
7140
  Returns
7123
7141
  -------
@@ -7465,7 +7483,7 @@ class Graph:
7465
7483
  path : str
7466
7484
  The path to the output file (e.g., "output.gv").
7467
7485
  device : str, optional
7468
- The output format device, such as 'svg_inline', 'pdf', or 'png'. The default is 'svg_inline'.
7486
+ The output format device, such as 'svg_inline', 'pdf', or 'png'. Default is 'svg_inline'.
7469
7487
  deviceKey : str, optional
7470
7488
  Dictionary key to override the `device` value. Default is None.
7471
7489
  scale : float, optional
@@ -7585,7 +7603,7 @@ class Graph:
7585
7603
  overwrite : bool, optional
7586
7604
  If True, overwrites existing files at the given path. Default is False.
7587
7605
  silent : bool, optional
7588
- If True, suppresses console output. Default is False.
7606
+ If set to True, error and warning messages are suppressed. Default is False.
7589
7607
 
7590
7608
  Returns
7591
7609
  -------
@@ -7667,9 +7685,9 @@ class Graph:
7667
7685
  path : str
7668
7686
  The path to the JSON file.
7669
7687
  verticesKey : str , optional
7670
- The desired key name to call vertices. The default is "vertices".
7688
+ The desired key name to call vertices. Default is "vertices".
7671
7689
  edgesKey : str , optional
7672
- The desired key name to call edges. The default is "edges".
7690
+ The desired key name to call edges. Default is "edges".
7673
7691
  vertexLabelKey : str , optional
7674
7692
  If set to a valid string, the vertex label will be set to the value at this key. Otherwise it will be set to Vertex_XXXX where XXXX is a sequential unique number.
7675
7693
  Note: If vertex labels are not unique, they will be forced to be unique.
@@ -7677,19 +7695,19 @@ class Graph:
7677
7695
  If set to a valid string, the edge label will be set to the value at this key. Otherwise it will be set to Edge_XXXX where XXXX is a sequential unique number.
7678
7696
  Note: If edge labels are not unique, they will be forced to be unique.
7679
7697
  xKey : str , optional
7680
- The desired key name to use for x-coordinates. The default is "x".
7698
+ The desired key name to use for x-coordinates. Default is "x".
7681
7699
  yKey : str , optional
7682
- The desired key name to use for y-coordinates. The default is "y".
7700
+ The desired key name to use for y-coordinates. Default is "y".
7683
7701
  zKey : str , optional
7684
- The desired key name to use for z-coordinates. The default is "z".
7702
+ The desired key name to use for z-coordinates. Default is "z".
7685
7703
  indent : int , optional
7686
- The desired amount of indent spaces to use. The default is 4.
7704
+ The desired amount of indent spaces to use. Default is 4.
7687
7705
  sortKeys : bool , optional
7688
- If set to True, the keys will be sorted. Otherwise, they won't be. The default is False.
7706
+ If set to True, the keys will be sorted. Otherwise, they won't be. Default is False.
7689
7707
  mantissa : int , optional
7690
- The desired length of the mantissa. The default is 6.
7708
+ The number of decimal places to round the result to. Default is 6.
7691
7709
  overwrite : bool , optional
7692
- If set to True the ouptut file will overwrite any pre-existing file. Otherwise, it won't. The default is False.
7710
+ If set to True the ouptut file will overwrite any pre-existing file. Otherwise, it won't. Default is False.
7693
7711
 
7694
7712
  Returns
7695
7713
  -------
@@ -7735,9 +7753,9 @@ class Graph:
7735
7753
  graph : topologic_core.Graph
7736
7754
  The input graph
7737
7755
  mantissa : int , optional
7738
- The desired length of the mantissa. The default is 6.
7756
+ The number of decimal places to round the result to. Default is 6.
7739
7757
  silent : bool , optional
7740
- If set to True, error and warning messages are suppressed. The default is False.
7758
+ If set to True, error and warning messages are suppressed. Default is False.
7741
7759
 
7742
7760
  Returns
7743
7761
  -------
@@ -7766,14 +7784,14 @@ class Graph:
7766
7784
  graph : topologicp.Graph
7767
7785
  The input topologic graph.
7768
7786
  key : str , optional
7769
- The vertex and edge dictionary key under which to store the parition number. The default is "partition".
7787
+ The vertex and edge dictionary key under which to store the parition number. Default is "partition".
7770
7788
  Valid partition numbers start from 1. Cut edges receive a partition number of 0.
7771
7789
  mantissa : int , optional
7772
- The desired length of the mantissa. The default is 6.
7790
+ The number of decimal places to round the result to. Default is 6.
7773
7791
  tolerance : float , optional
7774
- The desired tolerance. The default is 0.0001.
7792
+ The desired tolerance. Default is 0.0001.
7775
7793
  silent : bool , optional
7776
- If set to True, error and warning messages are suppressed. The default is False.
7794
+ If set to True, error and warning messages are suppressed. Default is False.
7777
7795
 
7778
7796
  Returns
7779
7797
  -------
@@ -7840,7 +7858,7 @@ class Graph:
7840
7858
  graph : topologic_core.Graph
7841
7859
  The input graph.
7842
7860
  silent : bool , optional
7843
- If set to True, error and warning messages are suppressed. The default is False.
7861
+ If set to True, error and warning messages are suppressed. Default is False.
7844
7862
 
7845
7863
  Returns
7846
7864
  -------
@@ -7872,7 +7890,7 @@ class Graph:
7872
7890
  maxIterations : int , optional
7873
7891
  This number limits the number of iterations to prevent the function from running indefinitely, particularly for very large or complex graphs.
7874
7892
  silent : bool , optional
7875
- If set to True, error and warning messages are suppressed. The default is False.
7893
+ If set to True, error and warning messages are suppressed. Default is False.
7876
7894
 
7877
7895
  Returns
7878
7896
  -------
@@ -7987,25 +8005,25 @@ class Graph:
7987
8005
  If set to 'cluster 2D', or 'cluster 3D, the nodes will be clustered according to the 'key' input parameter. The overall radius of the cluster is determined by the size input parameter (radius = size/2)
7988
8006
  The default is 'spring 2D'.
7989
8007
  k : float, optional
7990
- The desired spring constant to use for the attractive and repulsive forces. The default is 0.8.
8008
+ The desired spring constant to use for the attractive and repulsive forces. Default is 0.8.
7991
8009
  seed : int , optional
7992
- The desired random seed to use. The default is None.
8010
+ The desired random seed to use. Default is None.
7993
8011
  iterations : int , optional
7994
- The desired maximum number of iterations to solve the forces in the 'spring' mode. The default is 50.
8012
+ The desired maximum number of iterations to solve the forces in the 'spring' mode. Default is 50.
7995
8013
  rootVertex : topologic_core.Vertex , optional
7996
8014
  The desired vertex to use as the root of the tree and radial layouts.
7997
8015
  size : float , optional
7998
8016
  The desired overall size of the graph.
7999
8017
  sides : int , optional
8000
- The desired number of sides of the circle layout option. The default is 16
8018
+ The desired number of sides of the circle layout option. Default is 16
8001
8019
  length : float, optional
8002
- The desired horizontal length for the line layout option. The default is 1.0.
8020
+ The desired horizontal length for the line layout option. Default is 1.0.
8003
8021
  key : string, optional
8004
- The key under which to find the clustering value for the 'cluster_2d' and 'cluster_3d' options. The default is "".
8022
+ The key under which to find the clustering value for the 'cluster_2d' and 'cluster_3d' options. Default is "".
8005
8023
  tolerance : float , optional
8006
- The desired tolerance. The default is 0.0001.
8024
+ The desired tolerance. Default is 0.0001.
8007
8025
  silent : bool , optional
8008
- If set to True, error and warning messages are suppressed. The default is False.
8026
+ If set to True, error and warning messages are suppressed. Default is False.
8009
8027
 
8010
8028
  Returns
8011
8029
  -------
@@ -9048,7 +9066,7 @@ class Graph:
9048
9066
  graph : topologic_core.Graph
9049
9067
  The input graph.
9050
9068
  device : str, optional
9051
- The output format device, such as 'svg_inline', 'pdf', or 'png'. The default is 'svg_inline'.
9069
+ The output format device, such as 'svg_inline', 'pdf', or 'png'. Default is 'svg_inline'.
9052
9070
  deviceKey : str, optional
9053
9071
  Dictionary key to override the `device` value. Default is None.
9054
9072
  scale : float, optional
@@ -9168,7 +9186,7 @@ class Graph:
9168
9186
  overwrite : bool, optional
9169
9187
  If True, overwrites existing files at the given path. Default is False.
9170
9188
  silent : bool, optional
9171
- If True, suppresses console output. Default is False.
9189
+ If set to True, error and warning messages are suppressed. Default is False.
9172
9190
 
9173
9191
  Returns
9174
9192
  -------
@@ -9318,24 +9336,24 @@ class Graph:
9318
9336
  ["vertex", "edge", "wire", "face", "shell", "cell", "cellComplex"].
9319
9337
  topDown : bool , optional
9320
9338
  If set to True, the graph edges are directed from topologies to their subtopologies.
9321
- Otherwise, they are directed from topologies to their supertopologies. The default is False.
9339
+ Otherwise, they are directed from topologies to their supertopologies. Default is False.
9322
9340
  minDistance : float , optional
9323
- The desired minimum distance between the vertices of the graph. The default is 0.1.
9341
+ The desired minimum distance between the vertices of the graph. Default is 0.1.
9324
9342
  vertexLabelKey: str , optional
9325
- The desired vertex dictionary key under which to store a unique label (of the form Type_Index). The default is "label".
9343
+ The desired vertex dictionary key under which to store a unique label (of the form Type_Index). Default is "label".
9326
9344
  vertexTypeKey: str , optional
9327
- The desired vertex dictionary key under which to store the topology type (e.g. "vertex", "edge", "wire"). The default is "type".
9345
+ The desired vertex dictionary key under which to store the topology type (e.g. "vertex", "edge", "wire"). Default is "type".
9328
9346
  vertexColorKey: str , optional
9329
- The desired vertex dictionary key under which to store the topology color. The default is "color".
9347
+ The desired vertex dictionary key under which to store the topology color. Default is "color".
9330
9348
  colorScale : str , optional
9331
- The desired type of plotly color scales to use (e.g. "viridis", "plasma"). The default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
9349
+ The desired type of plotly color scales to use (e.g. "viridis", "plasma"). Default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
9332
9350
  In addition to these, three color-blind friendly scales are included. These are "protanopia", "deuteranopia", and "tritanopia" for red, green, and blue colorblindness respectively.
9333
9351
  storeBREP : bool , optional
9334
- If set to True, store the BRep of the topology in its representative vertex. The default is False.
9352
+ If set to True, store the BRep of the topology in its representative vertex. Default is False.
9335
9353
  tolerance : float
9336
- The desired tolerance. The default is 0.0001.
9354
+ The desired tolerance. Default is 0.0001.
9337
9355
  silent : bool , optional
9338
- If set to True, error and warning messages are suppressed. The default is False.
9356
+ If set to True, error and warning messages are suppressed. Default is False.
9339
9357
 
9340
9358
  Returns
9341
9359
  -------
@@ -9435,6 +9453,278 @@ class Graph:
9435
9453
  return_graph = Graph.SetDictionary(return_graph, Topology.Dictionary(topology))
9436
9454
  return return_graph
9437
9455
 
9456
+
9457
+ @staticmethod
9458
+ def HopperKernel(graphA,
9459
+ graphB,
9460
+ key: str = None,
9461
+ maxHops: int = 3,
9462
+ decay: float = 0.5,
9463
+ normalize: bool = True,
9464
+ mantissa: int = 6,
9465
+ silent: bool = False):
9466
+ """
9467
+ Returns the Graph Hopper kernel between two graphs. This kernel compares hop-wise shortest-path
9468
+ frontiers between nodes in two graphs using an automatically selected node-level kernel:
9469
+ numeric Radial Basis Function (RBF) if the `key` values are numeric, categorical (delta) if the `key` values are non-numeric,
9470
+ or vertex degree if `key` is None or missing. See Vishwanathan et al. (2010) for path-based graph kernels.
9471
+
9472
+ Parameters
9473
+ ----------
9474
+ graphA : topologic_core.Graph
9475
+ The first input graph.
9476
+ graphB : topologic_core.Graph
9477
+ The second input graph.
9478
+ key : str , optional
9479
+ The vertex dictionary key used to derive node features. If numeric for most vertices, a numeric
9480
+ RBF node kernel is used; if non-numeric, a delta node kernel is used. If None or missing, the
9481
+ vertex degree is used as a numeric feature. Default is None.
9482
+ maxHops : int , optional
9483
+ The maximum shortest-path hop distance to consider. Default is 3.
9484
+ decay : float , optional
9485
+ A per-hop geometric decay factor in the range (0, 1]. Default is 0.5.
9486
+ normalize : bool , optional
9487
+ If True, the kernel is cosine-normalized using self-kernel values so that identical graphs score 1.0.
9488
+ The default is True.
9489
+ mantissa : int , optional
9490
+ The number of decimal places to which to round the result. Default is 6.
9491
+ silent : bool , optional
9492
+ If set to True, error and warning messages are suppressed. Default is False.
9493
+
9494
+ Returns
9495
+ -------
9496
+ float
9497
+ The (optionally normalized) Graph Hopper kernel value rounded to the specified mantissa.
9498
+ """
9499
+ from math import sqrt, exp
9500
+ from statistics import median
9501
+ from topologicpy.Topology import Topology
9502
+ from topologicpy.Dictionary import Dictionary
9503
+
9504
+ # Validate graphs
9505
+ if not Topology.IsInstance(graphA, "Graph"):
9506
+ if not silent: print("Graph.HopperKernel - Error: The input graphA parameter is not a valid topologic graph. Returning None.")
9507
+ return None
9508
+ if not Topology.IsInstance(graphB, "Graph"):
9509
+ if not silent: print("Graph.HopperKernel - Error: The input graphB parameter is not a valid topologic graph. Returning None.")
9510
+ return None
9511
+
9512
+ # Clamp/clean params
9513
+ if maxHops < 0: maxHops = 0
9514
+ try:
9515
+ decay = float(decay)
9516
+ except Exception:
9517
+ decay = 0.5
9518
+ if decay <= 0: decay = 1.0 # no decay if mis-set
9519
+
9520
+ # Helpers
9521
+ def _vertices_and_index(G):
9522
+ V = Graph.Vertices(G) or []
9523
+ vidx = {v: i for i, v in enumerate(V)}
9524
+ return V, vidx
9525
+
9526
+ def _adj_lists(G, vidx):
9527
+ adj = {i: [] for i in vidx.values()}
9528
+ for v, i in vidx.items():
9529
+ nbrs = Graph.AdjacentVertices(G, v) or []
9530
+ adj[i] = sorted(vidx[n] for n in nbrs if n in vidx and n is not v)
9531
+ return adj
9532
+
9533
+ def _degree_features(adj):
9534
+ # one-dimensional numeric feature as a tuple
9535
+ return {i: (float(len(neigh)),) for i, neigh in adj.items()}
9536
+
9537
+ def _collect_key_values(G, V, vidx):
9538
+ # returns dict idx -> raw value or None
9539
+ vals = {}
9540
+ if key is None:
9541
+ return vals, 0, 0 # empty means fallback later
9542
+ found = 0
9543
+ nonnull = 0
9544
+ for v in V:
9545
+ d = Topology.Dictionary(v)
9546
+ val = Dictionary.ValueAtKey(d, key)
9547
+ if val is not None:
9548
+ nonnull += 1
9549
+ vals[vidx[v]] = val
9550
+ found += 1
9551
+ return vals, found, nonnull
9552
+
9553
+ def _infer_feature_mode(valsA, valsB):
9554
+ # Decide numeric vs label from available non-null values
9555
+ samples = []
9556
+ for d in (valsA, valsB):
9557
+ for val in d.values():
9558
+ if val is not None:
9559
+ samples.append(val)
9560
+ if not samples:
9561
+ return "degree" # fallback
9562
+ numeric = 0
9563
+ total = 0
9564
+ for x in samples:
9565
+ total += 1
9566
+ try:
9567
+ float(x)
9568
+ numeric += 1
9569
+ except Exception:
9570
+ pass
9571
+ frac = (numeric / total) if total else 0.0
9572
+ return "numeric" if frac >= 0.8 else "label"
9573
+
9574
+ def _features_from_key(mode, vals, adj):
9575
+ if mode == "numeric":
9576
+ # coerce to float, missing -> 0.0
9577
+ feats = {}
9578
+ for i in adj:
9579
+ v = vals.get(i, None)
9580
+ try:
9581
+ feats[i] = (float(v),)
9582
+ except Exception:
9583
+ feats[i] = (0.0,)
9584
+ return feats
9585
+ if mode == "label":
9586
+ labs = {}
9587
+ for i in adj:
9588
+ v = vals.get(i, None)
9589
+ labs[i] = str(v) if v is not None else "__MISSING__"
9590
+ return labs
9591
+ # degree fallback
9592
+ return _degree_features(adj)
9593
+
9594
+ def _shells_by_hops(adj, max_hops):
9595
+ # For each root, BFS layers up to max_hops. Returns list of lists of sets.
9596
+ n = len(adj)
9597
+ shells = [ [set() for _ in range(max_hops+1)] for _ in range(n) ]
9598
+ for root in range(n):
9599
+ visited = set([root])
9600
+ shells[root][0].add(root)
9601
+ frontier = [root]
9602
+ for h in range(1, max_hops+1):
9603
+ new_frontier = []
9604
+ for u in frontier:
9605
+ for w in adj[u]:
9606
+ if w not in visited:
9607
+ visited.add(w)
9608
+ new_frontier.append(w)
9609
+ if not new_frontier:
9610
+ break
9611
+ shells[root][h].update(new_frontier)
9612
+ frontier = new_frontier
9613
+ return shells
9614
+
9615
+ def _pairwise_median_sigma(pool):
9616
+ # pool is a list of numeric tuples
9617
+ vals = []
9618
+ m = len(pool)
9619
+ for i in range(m):
9620
+ xi = pool[i]
9621
+ for j in range(i+1, m):
9622
+ xj = pool[j]
9623
+ s = 0.0
9624
+ for a, b in zip(xi, xj):
9625
+ d = a - b
9626
+ s += d*d
9627
+ vals.append(sqrt(s))
9628
+ if not vals:
9629
+ return 1.0
9630
+ med = median(vals)
9631
+ return med if med > 0 else 1.0
9632
+
9633
+ # If Key is None, encode the degree centrality
9634
+ if key == None:
9635
+ _ = Graph.DegreeCentrality(graphA, key="_dc_")
9636
+ _ = Graph.DegreeCentrality(graphB, key="_dc_")
9637
+ key = "_dc_"
9638
+
9639
+ # Indexing and adjacency
9640
+ VA, idxA = _vertices_and_index(graphA)
9641
+ VB, idxB = _vertices_and_index(graphB)
9642
+ adjA = _adj_lists(graphA, idxA)
9643
+ adjB = _adj_lists(graphB, idxB)
9644
+
9645
+ # Build features according to key and data type
9646
+ valsA, _, _ = _collect_key_values(graphA, VA, idxA)
9647
+ valsB, _, _ = _collect_key_values(graphB, VB, idxB)
9648
+ mode = _infer_feature_mode(valsA, valsB) if key is not None else "degree"
9649
+
9650
+ featsA = _features_from_key(mode, valsA, adjA)
9651
+ featsB = _features_from_key(mode, valsB, adjB)
9652
+
9653
+ # Prepare shells
9654
+ shellsA = _shells_by_hops(adjA, maxHops)
9655
+ shellsB = _shells_by_hops(adjB, maxHops)
9656
+
9657
+ # Node kernels
9658
+ hopNormalize = True # fixed to reduce size bias
9659
+
9660
+ if mode == "label":
9661
+ def knode_AB(x, y):
9662
+ return 1.0 if featsA[x] == featsB[y] else 0.0
9663
+ def knode_AA(x, y):
9664
+ return 1.0 if featsA[x] == featsA[y] else 0.0
9665
+ def knode_BB(x, y):
9666
+ return 1.0 if featsB[x] == featsB[y] else 0.0
9667
+ else:
9668
+ # numeric RBF; estimate sigma from pooled features
9669
+ pool = list(featsA.values()) + list(featsB.values())
9670
+ sigma = _pairwise_median_sigma(pool)
9671
+ denom = 2.0 * (sigma * sigma)
9672
+ def _rbf(fX, fY):
9673
+ s = 0.0
9674
+ for a, b in zip(fX, fY):
9675
+ d = a - b
9676
+ s += d*d
9677
+ return exp(-s / denom) if denom > 0 else 0.0
9678
+ def knode_AB(x, y):
9679
+ return _rbf(featsA[x], featsB[y])
9680
+ def knode_AA(x, y):
9681
+ return _rbf(featsA[x], featsA[y])
9682
+ def knode_BB(x, y):
9683
+ return _rbf(featsB[x], featsB[y])
9684
+
9685
+ # Core kernel accumulation
9686
+ def _kernel_raw(shellsX, shellsY, knode_xy):
9687
+ total = 0.0
9688
+ nX = len(shellsX); nY = len(shellsY)
9689
+ for h in range(maxHops+1):
9690
+ hop_sum = 0.0
9691
+ for u in range(nX):
9692
+ Su = shellsX[u][h]
9693
+ if not Su:
9694
+ continue
9695
+ for v in range(nY):
9696
+ Sv = shellsY[v][h]
9697
+ if not Sv:
9698
+ continue
9699
+ inner = 0.0
9700
+ for x in Su:
9701
+ for y in Sv:
9702
+ inner += knode_xy(x, y)
9703
+ if hopNormalize:
9704
+ denom_local = float(len(Su) * len(Sv))
9705
+ if denom_local > 0:
9706
+ inner /= denom_local
9707
+ hop_sum += inner
9708
+ total += (decay ** h) * hop_sum
9709
+ return total
9710
+
9711
+ K_ab = _kernel_raw(shellsA, shellsB, knode_AB)
9712
+
9713
+ if not normalize:
9714
+ return round(float(K_ab), mantissa)
9715
+
9716
+ # Self-kernels for normalization
9717
+ K_aa = _kernel_raw(shellsA, shellsA, knode_AA)
9718
+ K_bb = _kernel_raw(shellsB, shellsB, knode_BB)
9719
+
9720
+ denom_norm = (K_aa * K_bb) ** 0.5
9721
+ value = float(K_ab) / denom_norm if denom_norm > 0 else 0.0
9722
+ # Cleanup keys and values that we encoded:
9723
+ if key == "_dc_":
9724
+ _ = [Topology.SetDictionary(v, Dictionary.RemoveKey(Topology.Dictionary(v), "_dc_")) for v in Graph.Vertices(graphA)]
9725
+ _ = [Topology.SetDictionary(v, Dictionary.RemoveKey(Topology.Dictionary(v), "_dc_")) for v in Graph.Vertices(graphB)]
9726
+ return round(value, mantissa)
9727
+
9438
9728
  @staticmethod
9439
9729
  def IncomingEdges(graph, vertex, directed: bool = False, tolerance: float = 0.0001) -> list:
9440
9730
  """
@@ -9448,9 +9738,9 @@ class Graph:
9448
9738
  vertex : topologic_core.Vertex
9449
9739
  The input vertex.
9450
9740
  directed : bool , optional
9451
- If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. The default is False.
9741
+ If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. Default is False.
9452
9742
  tolerance : float , optional
9453
- The desired tolerance. The default is 0.0001.
9743
+ The desired tolerance. Default is 0.0001.
9454
9744
 
9455
9745
  Returns
9456
9746
  -------
@@ -9492,9 +9782,9 @@ class Graph:
9492
9782
  vertex : topologic_core.Vertex
9493
9783
  The input vertex.
9494
9784
  directed : bool , optional
9495
- If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. The default is False.
9785
+ If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. Default is False.
9496
9786
  tolerance : float , optional
9497
- The desired tolerance. The default is 0.0001.
9787
+ The desired tolerance. Default is 0.0001.
9498
9788
 
9499
9789
  Returns
9500
9790
  -------
@@ -9561,11 +9851,11 @@ class Graph:
9561
9851
  colorScale : str , optional
9562
9852
  Plotly color scale name (e.g., "viridis", "plasma").
9563
9853
  mantissa : int , optional
9564
- The desired length of the mantissa. The default is 6.
9854
+ The number of decimal places to round the result to. Default is 6.
9565
9855
  tolerance : float , optional
9566
- The desired tolerance. The default is 0.0001.
9856
+ The desired tolerance. Default is 0.0001.
9567
9857
  silent : bool , optional
9568
- If set to True, error and warning messages are suppressed. The default is False.
9858
+ If set to True, error and warning messages are suppressed. Default is False.
9569
9859
 
9570
9860
  Returns
9571
9861
  -------
@@ -9595,7 +9885,7 @@ class Graph:
9595
9885
  graph : topologic_core.Graph
9596
9886
  The input graph.
9597
9887
  tolerance : float , optional
9598
- The desired tolerance. The default is 0.0001.
9888
+ The desired tolerance. Default is 0.0001.
9599
9889
 
9600
9890
  Returns
9601
9891
  -------
@@ -9703,7 +9993,7 @@ class Graph:
9703
9993
  vertexB : topologic_core.Vertex
9704
9994
  The second input vertex
9705
9995
  silent : bool , optional
9706
- If set to True, error and warning messages are suppressed. The default is False.
9996
+ If set to True, error and warning messages are suppressed. Default is False.
9707
9997
 
9708
9998
  Returns
9709
9999
  -------
@@ -9848,25 +10138,25 @@ class Graph:
9848
10138
  context : dict, optional
9849
10139
  A JSON-LD context mapping TopologicPy keys to IRIs (e.g., schema.org, geo, etc.).
9850
10140
  verticesKey : str , optional
9851
- The desired key name to call vertices. The default is "vertices".
10141
+ The desired key name to call vertices. Default is "vertices".
9852
10142
  edgesKey : str , optional
9853
- The desired key name to call edges. The default is "edges".
10143
+ The desired key name to call edges. Default is "edges".
9854
10144
  labelKey : str , optional
9855
- The desired key name to use for label. The default is "label".
10145
+ The desired key name to use for label. Default is "label".
9856
10146
  sourceKey : str , optional
9857
- The desired key name to use for source. The default is "source".
10147
+ The desired key name to use for source. Default is "source".
9858
10148
  targetKey : str , optional
9859
- The desired key name to use for target. The default is "target".
10149
+ The desired key name to use for target. Default is "target".
9860
10150
  categoryKey : str , optional
9861
- The desired key name to use for lcategoryabel. The default is "category".
10151
+ The desired key name to use for lcategoryabel. Default is "category".
9862
10152
  xKey : str , optional
9863
- The desired key name to use for x-coordinates. The default is "x".
10153
+ The desired key name to use for x-coordinates. Default is "x".
9864
10154
  yKey : str , optional
9865
- The desired key name to use for y-coordinates. The default is "y".
10155
+ The desired key name to use for y-coordinates. Default is "y".
9866
10156
  zKey : str , optional
9867
- The desired key name to use for z-coordinates. The default is "z".
10157
+ The desired key name to use for z-coordinates. Default is "z".
9868
10158
  mantissa : int , optional
9869
- The desired length of the mantissa. The default is 6.
10159
+ The number of decimal places to round the result to. Default is 6.
9870
10160
 
9871
10161
  Returns
9872
10162
  -------
@@ -9958,29 +10248,29 @@ class Graph:
9958
10248
  context : dict, optional
9959
10249
  A JSON-LD context mapping TopologicPy keys to IRIs (e.g., schema.org, geo, etc.).
9960
10250
  verticesKey : str , optional
9961
- The desired key name to call vertices. The default is "vertices".
10251
+ The desired key name to call vertices. Default is "vertices".
9962
10252
  edgesKey : str , optional
9963
- The desired key name to call edges. The default is "edges".
10253
+ The desired key name to call edges. Default is "edges".
9964
10254
  labelKey : str , optional
9965
- The desired key name to use for label. The default is "label".
10255
+ The desired key name to use for label. Default is "label".
9966
10256
  sourceKey : str , optional
9967
- The desired key name to use for source. The default is "source".
10257
+ The desired key name to use for source. Default is "source".
9968
10258
  targetKey : str , optional
9969
- The desired key name to use for target. The default is "target".
10259
+ The desired key name to use for target. Default is "target".
9970
10260
  categoryKey : str , optional
9971
- The desired key name to use for lcategoryabel. The default is "category".
10261
+ The desired key name to use for lcategoryabel. Default is "category".
9972
10262
  xKey : str , optional
9973
- The desired key name to use for x-coordinates. The default is "x".
10263
+ The desired key name to use for x-coordinates. Default is "x".
9974
10264
  yKey : str , optional
9975
- The desired key name to use for y-coordinates. The default is "y".
10265
+ The desired key name to use for y-coordinates. Default is "y".
9976
10266
  zKey : str , optional
9977
- The desired key name to use for z-coordinates. The default is "z".
10267
+ The desired key name to use for z-coordinates. Default is "z".
9978
10268
  indent : int , optional
9979
- The desired indent. The default is 2.
10269
+ The desired indent. Default is 2.
9980
10270
  sortKeys : bool , optional
9981
- If set to True, the keys will be sorted. Otherwise, they won't be. The default is False.
10271
+ If set to True, the keys will be sorted. Otherwise, they won't be. Default is False.
9982
10272
  mantissa : int , optional
9983
- The desired length of the mantissa. The default is 6.
10273
+ The number of decimal places to round the result to. Default is 6.
9984
10274
  Returns
9985
10275
  -------
9986
10276
  dict
@@ -10028,9 +10318,9 @@ class Graph:
10028
10318
  path : str
10029
10319
  The path to the JSON file.
10030
10320
  verticesKey : str , optional
10031
- The desired key name to call vertices. The default is "vertices".
10321
+ The desired key name to call vertices. Default is "vertices".
10032
10322
  edgesKey : str , optional
10033
- The desired key name to call edges. The default is "edges".
10323
+ The desired key name to call edges. Default is "edges".
10034
10324
  vertexLabelKey : str , optional
10035
10325
  If set to a valid string, the vertex label will be set to the value at this key. Otherwise it will be set to Vertex_XXXX where XXXX is a sequential unique number.
10036
10326
  Note: If vertex labels are not unique, they will be forced to be unique.
@@ -10038,19 +10328,19 @@ class Graph:
10038
10328
  If set to a valid string, the edge label will be set to the value at this key. Otherwise it will be set to Edge_XXXX where XXXX is a sequential unique number.
10039
10329
  Note: If edge labels are not unique, they will be forced to be unique.
10040
10330
  xKey : str , optional
10041
- The desired key name to use for x-coordinates. The default is "x".
10331
+ The desired key name to use for x-coordinates. Default is "x".
10042
10332
  yKey : str , optional
10043
- The desired key name to use for y-coordinates. The default is "y".
10333
+ The desired key name to use for y-coordinates. Default is "y".
10044
10334
  zKey : str , optional
10045
- The desired key name to use for z-coordinates. The default is "z".
10335
+ The desired key name to use for z-coordinates. Default is "z".
10046
10336
  indent : int , optional
10047
- The desired amount of indent spaces to use. The default is 4.
10337
+ The desired amount of indent spaces to use. Default is 4.
10048
10338
  sortKeys : bool , optional
10049
- If set to True, the keys will be sorted. Otherwise, they won't be. The default is False.
10339
+ If set to True, the keys will be sorted. Otherwise, they won't be. Default is False.
10050
10340
  mantissa : int , optional
10051
- The desired length of the mantissa. The default is 6.
10341
+ The number of decimal places to round the result to. Default is 6.
10052
10342
  overwrite : bool , optional
10053
- If set to True the ouptut file will overwrite any pre-existing file. Otherwise, it won't. The default is False.
10343
+ If set to True the ouptut file will overwrite any pre-existing file. Otherwise, it won't. Default is False.
10054
10344
 
10055
10345
  Returns
10056
10346
  -------
@@ -10119,9 +10409,9 @@ class Graph:
10119
10409
  graph : topologic_core.Graph
10120
10410
  The input graph.
10121
10411
  verticesKey : str , optional
10122
- The desired key name to call vertices. The default is "vertices".
10412
+ The desired key name to call vertices. Default is "vertices".
10123
10413
  edgesKey : str , optional
10124
- The desired key name to call edges. The default is "edges".
10414
+ The desired key name to call edges. Default is "edges".
10125
10415
  vertexLabelKey : str , optional
10126
10416
  If set to a valid string, the vertex label will be set to the value at this key. Otherwise it will be set to Vertex_XXXX where XXXX is a sequential unique number.
10127
10417
  Note: If vertex labels are not unique, they will be forced to be unique.
@@ -10129,21 +10419,21 @@ class Graph:
10129
10419
  If set to a valid string, the edge label will be set to the value at this key. Otherwise it will be set to Edge_XXXX where XXXX is a sequential unique number.
10130
10420
  Note: If edge labels are not unique, they will be forced to be unique.
10131
10421
  sourceKey : str , optional
10132
- The dictionary key used to store the source vertex. The default is "source".
10422
+ The dictionary key used to store the source vertex. Default is "source".
10133
10423
  targetKey : str , optional
10134
- The dictionary key used to store the target vertex. The default is "target".
10424
+ The dictionary key used to store the target vertex. Default is "target".
10135
10425
  xKey : str , optional
10136
- The desired key name to use for x-coordinates. The default is "x".
10426
+ The desired key name to use for x-coordinates. Default is "x".
10137
10427
  yKey : str , optional
10138
- The desired key name to use for y-coordinates. The default is "y".
10428
+ The desired key name to use for y-coordinates. Default is "y".
10139
10429
  zKey : str , optional
10140
- The desired key name to use for z-coordinates. The default is "z".
10430
+ The desired key name to use for z-coordinates. Default is "z".
10141
10431
  geometryKey : str , optional
10142
- The desired key name to use for geometry. The default is "brep".
10432
+ The desired key name to use for geometry. Default is "brep".
10143
10433
  mantissa : int , optional
10144
- The desired length of the mantissa. The default is 6.
10434
+ The number of decimal places to round the result to. Default is 6.
10145
10435
  tolerance : float , optional
10146
- The desired tolerance. The default is 0.0001.
10436
+ The desired tolerance. Default is 0.0001.
10147
10437
 
10148
10438
  Returns
10149
10439
  -------
@@ -10236,9 +10526,9 @@ class Graph:
10236
10526
  graph : topologic_core.Graph
10237
10527
  The input graph.
10238
10528
  verticesKey : str , optional
10239
- The desired key name to call vertices. The default is "vertices".
10529
+ The desired key name to call vertices. Default is "vertices".
10240
10530
  edgesKey : str , optional
10241
- The desired key name to call edges. The default is "edges".
10531
+ The desired key name to call edges. Default is "edges".
10242
10532
  vertexLabelKey : str , optional
10243
10533
  If set to a valid string, the vertex label will be set to the value at this key. Otherwise it will be set to Vertex_XXXX where XXXX is a sequential unique number.
10244
10534
  Note: If vertex labels are not unique, they will be forced to be unique.
@@ -10246,17 +10536,17 @@ class Graph:
10246
10536
  If set to a valid string, the edge label will be set to the value at this key. Otherwise it will be set to Edge_XXXX where XXXX is a sequential unique number.
10247
10537
  Note: If edge labels are not unique, they will be forced to be unique.
10248
10538
  xKey : str , optional
10249
- The desired key name to use for x-coordinates. The default is "x".
10539
+ The desired key name to use for x-coordinates. Default is "x".
10250
10540
  yKey : str , optional
10251
- The desired key name to use for y-coordinates. The default is "y".
10541
+ The desired key name to use for y-coordinates. Default is "y".
10252
10542
  zKey : str , optional
10253
- The desired key name to use for z-coordinates. The default is "z".
10543
+ The desired key name to use for z-coordinates. Default is "z".
10254
10544
  indent : int , optional
10255
- The desired amount of indent spaces to use. The default is 4.
10545
+ The desired amount of indent spaces to use. Default is 4.
10256
10546
  sortKeys : bool , optional
10257
- If set to True, the keys will be sorted. Otherwise, they won't be. The default is False.
10547
+ If set to True, the keys will be sorted. Otherwise, they won't be. Default is False.
10258
10548
  mantissa : int , optional
10259
- The desired length of the mantissa. The default is 6.
10549
+ The number of decimal places to round the result to. Default is 6.
10260
10550
 
10261
10551
  Returns
10262
10552
  -------
@@ -10269,6 +10559,92 @@ class Graph:
10269
10559
  json_string = json.dumps(json_data, indent=indent, sort_keys=sortKeys)
10270
10560
  return json_string
10271
10561
 
10562
+ @staticmethod
10563
+ def Kernel(graphA,
10564
+ graphB,
10565
+ method: str = "WL",
10566
+ key: str = None,
10567
+ iterations: int = 2,
10568
+ maxHops: int = 3,
10569
+ decay: float = 0.5,
10570
+ normalize: bool = True,
10571
+ mantissa: int = 6,
10572
+ silent: bool = False,
10573
+ **kwargs):
10574
+ """
10575
+ Returns a graph-to-graph kernel value using the selected method. This is a
10576
+ convenience dispatcher over specific kernel implementations (e.g., WL and Hopper).
10577
+
10578
+ Parameters
10579
+ ----------
10580
+ graphA : topologic_core.Graph
10581
+ The first input graph.
10582
+ graphB : topologic_core.Graph
10583
+ The second input graph.
10584
+ method : str , optional
10585
+ The kernel method to use. Supported values: "WL" (Weisfeiler–Lehman),
10586
+ "Hopper" (Graph Hopper). The default is "WL".
10587
+ key : str , optional
10588
+ A vertex dictionary key used by the selected method to derive node labels/features.
10589
+ For "WL", if None the vertex degree is used as the initial label. For "Hopper",
10590
+ if None or missing, the vertex degree is used as a numeric feature. Default is None.
10591
+ iterations : int , optional
10592
+ WL-specific parameter: number of WL iterations. Ignored by other methods. Default is 2.
10593
+ maxHops : int , optional
10594
+ Hopper-specific parameter: maximum shortest-path hop distance. Ignored by other methods. Default is 3.
10595
+ decay : float , optional
10596
+ Hopper-specific parameter: per-hop geometric decay in (0, 1]. Ignored by other methods. Default is 0.5.
10597
+ normalize : bool , optional
10598
+ If True, returns a normalized kernel score in [0, 1] when supported by the method. Default is True.
10599
+ mantissa : int , optional
10600
+ Number of decimal places for rounding the returned value. Default is 6.
10601
+ silent : bool , optional
10602
+ If True, error and warning messages are suppressed. Default is False.
10603
+ **kwargs
10604
+ Reserved for future method-specific options; ignored by current implementations.
10605
+
10606
+ Returns
10607
+ -------
10608
+ float
10609
+ The kernel value computed by the selected method, rounded to `mantissa`,
10610
+ or None if inputs are invalid or the method is unsupported.
10611
+
10612
+ Notes
10613
+ -----
10614
+ - "WL" calls `Graph.WLKernel(graphA, graphB, key=..., iterations=..., normalize=..., mantissa=...)`.
10615
+ - "Hopper" calls `Graph.HopperKernel(graphA, graphB, key=..., maxHops=..., decay=..., normalize=..., mantissa=...)`.
10616
+ - Method selection is case-insensitive and tolerates common aliases for WL.
10617
+ """
10618
+ # Normalize method string and map aliases
10619
+ m = (method or "WL").strip().lower()
10620
+ if m in ("wl", "weisfeiler", "weisfeiler-lehman", "weisfeiler_lehman"):
10621
+ return Graph.WLKernel(
10622
+ graphA=graphA,
10623
+ graphB=graphB,
10624
+ key=key,
10625
+ iterations=iterations,
10626
+ normalize=normalize,
10627
+ mantissa=mantissa,
10628
+ silent=silent
10629
+ )
10630
+ elif m in ("hopper", "graphhopper", "graph_hopper"):
10631
+ return Graph.HopperKernel(
10632
+ graphA=graphA,
10633
+ graphB=graphB,
10634
+ key=key,
10635
+ maxHops=maxHops,
10636
+ decay=decay,
10637
+ normalize=normalize,
10638
+ mantissa=mantissa,
10639
+ silent=silent
10640
+ )
10641
+ else:
10642
+ if not silent:
10643
+ print(f'Graph.Kernel - Error: Unsupported method "{method}". '
10644
+ f'Supported methods are "WL" and "Hopper". Returning None.')
10645
+ return None
10646
+
10647
+ @staticmethod
10272
10648
  def Laplacian(graph, silent: bool = False, normalized: bool = False):
10273
10649
  """
10274
10650
  Returns the Laplacian matrix of the input graph. See https://en.wikipedia.org/wiki/Laplacian_matrix.
@@ -10278,9 +10654,9 @@ class Graph:
10278
10654
  graph : topologic_core.Graph
10279
10655
  The input graph.
10280
10656
  silent : bool , optional
10281
- If set to True, error and warning messages are suppressed. The default is False.
10657
+ If set to True, error and warning messages are suppressed. Default is False.
10282
10658
  normalized : bool , optional
10283
- If set to True, the returned Laplacian matrix is normalized. The default is False.
10659
+ If set to True, the returned Laplacian matrix is normalized. Default is False.
10284
10660
 
10285
10661
  Returns
10286
10662
  -------
@@ -10338,11 +10714,11 @@ class Graph:
10338
10714
  the vertex degree. If a numeric value cannot be retrieved from an edge, a value of 1 is used instead.
10339
10715
  This is used in weighted graphs. if weightKey is set to "Length" or "Distance", the length of the edge will be used as its weight.
10340
10716
  mantissa : int , optional
10341
- The desired length of the mantissa. The default is 6.
10717
+ The number of decimal places to round the result to. Default is 6.
10342
10718
  tolerance : float , optional
10343
- The desired tolerance. The default is 0.0001.
10719
+ The desired tolerance. Default is 0.0001.
10344
10720
  silent : bool , optional
10345
- If set to True, error and warning messages are suppressed. The default is False.
10721
+ If set to True, error and warning messages are suppressed. Default is False.
10346
10722
 
10347
10723
  Returns
10348
10724
  -------
@@ -10372,9 +10748,9 @@ class Graph:
10372
10748
  transferEdgeDictionaries : bool, optional
10373
10749
  If set to True, the dictionaries of the edges of the input graph are transferred to the vertices of the line graph.
10374
10750
  tolerance : float, optional
10375
- The desired tolerance. The default is 0.0001.
10751
+ The desired tolerance. Default is 0.0001.
10376
10752
  silent : bool , optional
10377
- If set to True, error and warning messages are suppressed. The default is False.
10753
+ If set to True, error and warning messages are suppressed. Default is False.
10378
10754
 
10379
10755
  Returns
10380
10756
  -------
@@ -10444,13 +10820,13 @@ class Graph:
10444
10820
  graph : topologic_core.Graph
10445
10821
  The input graph.
10446
10822
  vertices : list , optional
10447
- The input list of vertices. If set to None, the local clustering coefficient of all vertices will be computed. The default is None.
10823
+ The input list of vertices. If set to None, the local clustering coefficient of all vertices will be computed. Default is None.
10448
10824
  key : str , optional
10449
- The dictionary key under which to store the local clustering coefficient score. The default is "lcc".
10825
+ The dictionary key under which to store the local clustering coefficient score. Default is "lcc".
10450
10826
  mantissa : int , optional
10451
- The desired length of the mantissa. The default is 6.
10827
+ The number of decimal places to round the result to. Default is 6.
10452
10828
  tolerance : float , optional
10453
- The desired tolerance. The default is 0.0001.
10829
+ The desired tolerance. Default is 0.0001.
10454
10830
 
10455
10831
  Returns
10456
10832
  -------
@@ -10530,15 +10906,15 @@ class Graph:
10530
10906
  vertexB : topologic_core.Vertex
10531
10907
  The second input vertex.
10532
10908
  vertexKey : str , optional
10533
- The vertex key to maximize. If set the vertices dictionaries will be searched for this key and the associated value will be used to compute the longest path that maximizes the total value. The value must be numeric. The default is None.
10909
+ The vertex key to maximize. If set the vertices dictionaries will be searched for this key and the associated value will be used to compute the longest path that maximizes the total value. The value must be numeric. Default is None.
10534
10910
  edgeKey : str , optional
10535
- The edge key to maximize. If set the edges dictionaries will be searched for this key and the associated value will be used to compute the longest path that maximizes the total value. The value of the key must be numeric. If set to "length" (case insensitive), the shortest path by length is computed. The default is "length".
10911
+ The edge key to maximize. If set the edges dictionaries will be searched for this key and the associated value will be used to compute the longest path that maximizes the total value. The value of the key must be numeric. If set to "length" (case insensitive), the shortest path by length is computed. Default is "length".
10536
10912
  costKey : str , optional
10537
- If not None, the total cost of the longest_path will be stored in its dictionary under this key. The default is None.
10913
+ If not None, the total cost of the longest_path will be stored in its dictionary under this key. Default is None.
10538
10914
  timeLimit : int , optional
10539
- The time limit in second. The default is 10 seconds.
10915
+ The time limit in second. Default is 10 seconds.
10540
10916
  tolerance : float , optional
10541
- The desired tolerance. The default is 0.0001.
10917
+ The desired tolerance. Default is 0.0001.
10542
10918
 
10543
10919
  Returns
10544
10920
  -------
@@ -10638,9 +11014,9 @@ class Graph:
10638
11014
  edgeKeys : str or list of str, optional
10639
11015
  Keys used to semantically compare edges.
10640
11016
  maxMatches : int , optional
10641
- The maximum number of matches to find. The default is 10.
11017
+ The maximum number of matches to find. Default is 10.
10642
11018
  timeLimit : int , optional
10643
- The time limit in seconds. The default is 10 seconds. Note that this time limit only applies to finding the matches.
11019
+ The time limit in seconds. Default is 10 seconds. Note that this time limit only applies to finding the matches.
10644
11020
  tolerance : float, optional
10645
11021
  Allowed numeric deviation or minimum string similarity (e.g. 0.2 = ≥80% match). Default is 0.
10646
11022
  silent : bool, optional
@@ -10924,17 +11300,17 @@ class Graph:
10924
11300
  sink : topologic_core.Vertex
10925
11301
  The input sink/target vertex.
10926
11302
  edgeKeyFwd : str , optional
10927
- The edge dictionary key to use to find the value of the forward capacity of the edge. If not set, the length of the edge is used as its capacity. The default is None.
11303
+ The edge dictionary key to use to find the value of the forward capacity of the edge. If not set, the length of the edge is used as its capacity. Default is None.
10928
11304
  edgeKeyBwd : str , optional
10929
- The edge dictionary key to use to find the value of the backward capacity of the edge. This is only considered if the edge is set to be bidrectional. The default is None.
11305
+ The edge dictionary key to use to find the value of the backward capacity of the edge. This is only considered if the edge is set to be bidrectional. Default is None.
10930
11306
  bidirKey : str , optional
10931
- The edge dictionary key to use to determine if the edge is bidrectional. The default is None.
11307
+ The edge dictionary key to use to determine if the edge is bidrectional. Default is None.
10932
11308
  bidrectional : bool , optional
10933
- If set to True, the whole graph is considered to be bidirectional. The default is False.
11309
+ If set to True, the whole graph is considered to be bidirectional. Default is False.
10934
11310
  residualKey : str , optional
10935
- The name of the key to use to store the residual value of each edge capacity in the input graph. The default is "residual".
11311
+ The name of the key to use to store the residual value of each edge capacity in the input graph. Default is "residual".
10936
11312
  tolerance : float , optional
10937
- The desired tolerance. The default is 0.0001.
11313
+ The desired tolerance. Default is 0.0001.
10938
11314
 
10939
11315
  Returns
10940
11316
  -------
@@ -11041,9 +11417,9 @@ class Graph:
11041
11417
  transferDictionaries : bool, optional
11042
11418
  If True, the dictionaries of all input vertices (including the target vertex if given) are merged. Default is True.
11043
11419
  tolerance : float , optional
11044
- The desired tolerance. The default is 0.0001.
11420
+ The desired tolerance. Default is 0.0001.
11045
11421
  silent : bool , optional
11046
- If set to True, error and warning messages are suppressed. The default is False.
11422
+ If set to True, error and warning messages are suppressed. Default is False.
11047
11423
 
11048
11424
  Returns
11049
11425
  -------
@@ -11181,9 +11557,9 @@ class Graph:
11181
11557
  graph : topologic_core.Graph
11182
11558
  The input graph.
11183
11559
  mantissa : int , optional
11184
- The desired length of the mantissa. The default is 6.
11560
+ The number of decimal places to round the result to. Default is 6.
11185
11561
  tolerance : float , optional
11186
- The desired tolerance. The default is 0.0001.
11562
+ The desired tolerance. Default is 0.0001.
11187
11563
 
11188
11564
  Returns
11189
11565
  -------
@@ -11239,9 +11615,9 @@ class Graph:
11239
11615
  vertexB : topologic_core.Vertex
11240
11616
  The second input vertex.
11241
11617
  mantissa : int , optional
11242
- The desired length of the mantissa. The default is 6.
11618
+ The number of decimal places to round the result to. Default is 6.
11243
11619
  tolerance : float , optional
11244
- The desired tolerance. The default is 0.0001.
11620
+ The desired tolerance. Default is 0.0001.
11245
11621
 
11246
11622
  Returns
11247
11623
  -------
@@ -11304,9 +11680,9 @@ class Graph:
11304
11680
  graph : topologic_core.Graph
11305
11681
  The input graph.
11306
11682
  edgeKey : string , optional
11307
- If set, the value of the edgeKey will be used as the weight and the tree will minimize the weight. The value associated with the edgeKey must be numerical. If the key is not set, the edges will be sorted by their length. The default is None
11683
+ If set, the value of the edgeKey will be used as the weight and the tree will minimize the weight. The value associated with the edgeKey must be numerical. If the key is not set, the edges will be sorted by their length. Default is None
11308
11684
  tolerance : float , optional
11309
- The desired tolerance. The default is 0.0001.
11685
+ The desired tolerance. Default is 0.0001.
11310
11686
 
11311
11687
  Returns
11312
11688
  -------
@@ -11372,9 +11748,9 @@ class Graph:
11372
11748
  destinations : list
11373
11749
  The input list of destinations (vertices). Navigation edges will connect these vertices to sources.
11374
11750
  tolerance : float , optional
11375
- The desired tolerance. The default is 0.0001.
11751
+ The desired tolerance. Default is 0.0001.
11376
11752
  numWorkers : int, optional
11377
- Number of workers run in parallel to process. The default is None which sets the number to twice the number of CPU cores.
11753
+ Number of workers run in parallel to process. Default is None which sets the number to twice the number of CPU cores.
11378
11754
 
11379
11755
  Returns
11380
11756
  -------
@@ -11516,17 +11892,17 @@ class Graph:
11516
11892
  graph : topologic_core.Graph
11517
11893
  The input graph.
11518
11894
  xKey : str , optional
11519
- The dictionary key under which to store the X-Coordinate of the vertex. The default is 'x'.
11895
+ The dictionary key under which to store the X-Coordinate of the vertex. Default is 'x'.
11520
11896
  yKey : str , optional
11521
- The dictionary key under which to store the Y-Coordinate of the vertex. The default is 'y'.
11897
+ The dictionary key under which to store the Y-Coordinate of the vertex. Default is 'y'.
11522
11898
  zKey : str , optional
11523
- The dictionary key under which to store the Z-Coordinate of the vertex. The default is 'z'.
11899
+ The dictionary key under which to store the Z-Coordinate of the vertex. Default is 'z'.
11524
11900
  mantissa : int , optional
11525
- The desired length of the mantissa. The default is 6.
11901
+ The number of decimal places to round the result to. Default is 6.
11526
11902
  tolerance : float , optional
11527
- The desired tolerance. The default is 0.0001.
11903
+ The desired tolerance. Default is 0.0001.
11528
11904
  silent : bool , optional
11529
- If set to True, error and warning messages are suppressed. The default is False.
11905
+ If set to True, error and warning messages are suppressed. Default is False.
11530
11906
 
11531
11907
  Returns
11532
11908
  -------
@@ -11628,9 +12004,9 @@ class Graph:
11628
12004
  vertex : topologic_core.Vertex
11629
12005
  The input vertex.
11630
12006
  directed : bool , optional
11631
- If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. The default is False.
12007
+ If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. Default is False.
11632
12008
  tolerance : float , optional
11633
- The desired tolerance. The default is 0.0001.
12009
+ The desired tolerance. Default is 0.0001.
11634
12010
 
11635
12011
  Returns
11636
12012
  -------
@@ -11672,9 +12048,9 @@ class Graph:
11672
12048
  vertex : topologic_core.Vertex
11673
12049
  The input vertex.
11674
12050
  directed : bool , optional
11675
- If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. The default is False.
12051
+ If set to True, the graph is considered to be directed. Otherwise, it will be considered as an unidrected graph. Default is False.
11676
12052
  tolerance : float , optional
11677
- The desired tolerance. The default is 0.0001.
12053
+ The desired tolerance. Default is 0.0001.
11678
12054
 
11679
12055
  Returns
11680
12056
  -------
@@ -11711,24 +12087,24 @@ class Graph:
11711
12087
  graph : topologic_core.Graph
11712
12088
  The input graph.
11713
12089
  alpha : float , optional
11714
- The damping (dampening) factor. The default is 0.85. See https://en.wikipedia.org/wiki/PageRank.
12090
+ The damping (dampening) factor. Default is 0.85. See https://en.wikipedia.org/wiki/PageRank.
11715
12091
  maxIterations : int , optional
11716
- The maximum number of iterations to calculate the page rank. The default is 100.
12092
+ The maximum number of iterations to calculate the page rank. Default is 100.
11717
12093
  normalize : bool , optional
11718
- If set to True, the results will be normalized from 0 to 1. Otherwise, they won't be. The default is True.
12094
+ If set to True, the results will be normalized from 0 to 1. Otherwise, they won't be. Default is True.
11719
12095
  directed : bool , optional
11720
- If set to True, the graph is considered as a directed graph. Otherwise, it will be considered as an undirected graph. The default is False.
12096
+ If set to True, the graph is considered as a directed graph. Otherwise, it will be considered as an undirected graph. Default is False.
11721
12097
  key : str , optional
11722
- The dictionary key under which to store the page_rank score. The default is "page_rank"
12098
+ The dictionary key under which to store the page_rank score. Default is "page_rank"
11723
12099
  colorKey : str , optional
11724
- The desired dictionary key under which to store the pagerank color. The default is "pr_color".
12100
+ The desired dictionary key under which to store the pagerank color. Default is "pr_color".
11725
12101
  colorScale : str , optional
11726
- The desired type of plotly color scales to use (e.g. "viridis", "plasma"). The default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
12102
+ The desired type of plotly color scales to use (e.g. "viridis", "plasma"). Default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
11727
12103
  In addition to these, three color-blind friendly scales are included. These are "protanopia", "deuteranopia", and "tritanopia" for red, green, and blue colorblindness respectively.
11728
12104
  mantissa : int , optional
11729
12105
  The desired length of the mantissa.
11730
12106
  tolerance : float , optional
11731
- The desired tolerance. The default is 0.0001.
12107
+ The desired tolerance. Default is 0.0001.
11732
12108
 
11733
12109
  Returns
11734
12110
  -------
@@ -11802,20 +12178,20 @@ class Graph:
11802
12178
  - "Betweenness"
11803
12179
  - "Community" or "Louvain"
11804
12180
  - "Fiedler" or "Eigen"
11805
- It is case insensitive. The default is "Betweenness"
12181
+ It is case insensitive. Default is "Betweenness"
11806
12182
  n : int , optional
11807
- The desired number of partitions when selecting the "Betweenness" method. This parameter is ignored for other methods. The default is 2.
12183
+ The desired number of partitions when selecting the "Betweenness" method. This parameter is ignored for other methods. Default is 2.
11808
12184
  m : int , optional
11809
- The desired maximum number of tries to partition the graph when selecting the "Betweenness" method. This parameter is ignored for other methods. The default is 10.
12185
+ The desired maximum number of tries to partition the graph when selecting the "Betweenness" method. This parameter is ignored for other methods. Default is 10.
11810
12186
  key : str , optional
11811
- The vertex and edge dictionary key under which to store the parition number. The default is "partition".
12187
+ The vertex and edge dictionary key under which to store the parition number. Default is "partition".
11812
12188
  Valid partition numbers start from 1. Cut edges receive a partition number of 0.
11813
12189
  mantissa : int , optional
11814
- The desired length of the mantissa. The default is 6.
12190
+ The number of decimal places to round the result to. Default is 6.
11815
12191
  tolerance : float , optional
11816
- The desired tolerance. The default is 0.0001.
12192
+ The desired tolerance. Default is 0.0001.
11817
12193
  silent : bool , optional
11818
- If set to True, error and warning messages are suppressed. The default is False.
12194
+ If set to True, error and warning messages are suppressed. Default is False.
11819
12195
 
11820
12196
  Returns
11821
12197
  -------
@@ -11854,7 +12230,7 @@ class Graph:
11854
12230
  vertexB : topologic_core.Vertex
11855
12231
  The second input vertex.
11856
12232
  tolerance : float, optional
11857
- The desired tolerance. The default is 0.0001.
12233
+ The desired tolerance. Default is 0.0001.
11858
12234
 
11859
12235
  Returns
11860
12236
  -------
@@ -11901,48 +12277,48 @@ class Graph:
11901
12277
  overwrite : bool , optional
11902
12278
  If set to True, the HTML file is overwritten.
11903
12279
  height : int , optional
11904
- The desired figure height in pixels. The default is 900 pixels.
12280
+ The desired figure height in pixels. Default is 900 pixels.
11905
12281
  backgroundColor : str, optional
11906
- The desired background color for the figure. This can be a named color or a hexadecimal value. The default is 'white'.
12282
+ The desired background color for the figure. This can be a named color or a hexadecimal value. Default is 'white'.
11907
12283
  fontColor : str , optional
11908
- The desired font color for the figure. This can be a named color or a hexadecimal value. The default is 'black'.
12284
+ The desired font color for the figure. This can be a named color or a hexadecimal value. Default is 'black'.
11909
12285
  notebook : bool , optional
11910
- If set to True, the figure will be targeted at a Jupyter Notebook. Note that this is not working well. Pyvis has bugs. The default is False.
12286
+ If set to True, the figure will be targeted at a Jupyter Notebook. Note that this is not working well. Pyvis has bugs. Default is False.
11911
12287
  vertexSize : int , optional
11912
- The desired default vertex size. The default is 6.
12288
+ The desired default vertex size. Default is 6.
11913
12289
  vertexSizeKey : str , optional
11914
- If not set to None, the vertex size will be derived from the dictionary value set at this key. If set to "degree", the size of the vertex will be determined by its degree (number of neighbors). The default is None.
12290
+ If not set to None, the vertex size will be derived from the dictionary value set at this key. If set to "degree", the size of the vertex will be determined by its degree (number of neighbors). Default is None.
11915
12291
  vertexColor : str , optional
11916
- The desired default vertex color. his can be a named color or a hexadecimal value. The default is 'black'.
12292
+ The desired default vertex color. his can be a named color or a hexadecimal value. Default is 'black'.
11917
12293
  vertexColorKey : str , optional
11918
- If not set to None, the vertex color will be derived from the dictionary value set at this key. The default is None.
12294
+ If not set to None, the vertex color will be derived from the dictionary value set at this key. Default is None.
11919
12295
  vertexLabelKey : str , optional
11920
- If not set to None, the vertex label will be derived from the dictionary value set at this key. The default is None.
12296
+ If not set to None, the vertex label will be derived from the dictionary value set at this key. Default is None.
11921
12297
  vertexGroupKey : str , optional
11922
- If not set to None, the vertex color will be determined by the group the vertex belongs to as derived from the value set at this key. The default is None.
12298
+ If not set to None, the vertex color will be determined by the group the vertex belongs to as derived from the value set at this key. Default is None.
11923
12299
  vertexGroups : list , optional
11924
- The list of all possible vertex groups. This will help in vertex coloring. The default is None.
12300
+ The list of all possible vertex groups. This will help in vertex coloring. Default is None.
11925
12301
  minVertexGroup : int or float , optional
11926
- If the vertex groups are numeric, specify the minimum value you wish to consider for vertex coloring. The default is None.
12302
+ If the vertex groups are numeric, specify the minimum value you wish to consider for vertex coloring. Default is None.
11927
12303
  maxVertexGroup : int or float , optional
11928
- If the vertex groups are numeric, specify the maximum value you wish to consider for vertex coloring. The default is None.
12304
+ If the vertex groups are numeric, specify the maximum value you wish to consider for vertex coloring. Default is None.
11929
12305
 
11930
12306
  edgeWeight : int , optional
11931
- The desired default weight of the edge. This determines its thickness. The default is 0.
12307
+ The desired default weight of the edge. This determines its thickness. Default is 0.
11932
12308
  edgeWeightKey : str, optional
11933
- If not set to None, the edge weight will be derived from the dictionary value set at this key. If set to "length" or "distance", the weight of the edge will be determined by its geometric length. The default is None.
12309
+ If not set to None, the edge weight will be derived from the dictionary value set at this key. If set to "length" or "distance", the weight of the edge will be determined by its geometric length. Default is None.
11934
12310
  edgeLabelKey : str , optional
11935
- If not set to None, the edge label will be derived from the dictionary value set at this key. The default is None.
12311
+ If not set to None, the edge label will be derived from the dictionary value set at this key. Default is None.
11936
12312
  showNeighbors : bool , optional
11937
- If set to True, a list of neighbors is shown when you hover over a vertex. The default is True.
12313
+ If set to True, a list of neighbors is shown when you hover over a vertex. Default is True.
11938
12314
  selectMenu : bool , optional
11939
- If set to True, a selection menu will be displayed. The default is True
12315
+ If set to True, a selection menu will be displayed. Default is True
11940
12316
  filterMenu : bool , optional
11941
- If set to True, a filtering menu will be displayed. The default is True.
12317
+ If set to True, a filtering menu will be displayed. Default is True.
11942
12318
  colorScale : str , optional
11943
- The desired type of plotly color scales to use (e.g. "viridis", "plasma"). The default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
12319
+ The desired type of plotly color scales to use (e.g. "viridis", "plasma"). Default is "viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
11944
12320
  tolerance : float , optional
11945
- The desired tolerance. The default is 0.0001.
12321
+ The desired tolerance. Default is 0.0001.
11946
12322
  Returns
11947
12323
  -------
11948
12324
  None
@@ -12094,7 +12470,7 @@ class Graph:
12094
12470
  edge : topologic_core.Edge
12095
12471
  The input edge.
12096
12472
  tolerance : float , optional
12097
- The desired tolerance. The default is 0.0001.
12473
+ The desired tolerance. Default is 0.0001.
12098
12474
 
12099
12475
  Returns
12100
12476
  -------
@@ -12123,7 +12499,7 @@ class Graph:
12123
12499
  graph : topologic_core.Graph
12124
12500
  The input graph.
12125
12501
  tolerance : float , optional
12126
- The desired tolerance. The default is 0.0001.
12502
+ The desired tolerance. Default is 0.0001.
12127
12503
 
12128
12504
  Returns
12129
12505
  -------
@@ -12150,7 +12526,7 @@ class Graph:
12150
12526
  vertex : topologic_core.Vertex
12151
12527
  The input vertex.
12152
12528
  tolerance : float , optional
12153
- The desired tolerance. The default is 0.0001.
12529
+ The desired tolerance. Default is 0.0001.
12154
12530
 
12155
12531
  Returns
12156
12532
  -------
@@ -12219,11 +12595,11 @@ class Graph:
12219
12595
  vertexB : topologic_core.Vertex
12220
12596
  The second input vertex.
12221
12597
  vertexKey : string , optional
12222
- The vertex key to minimise. If set the vertices dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value must be numeric. The default is None.
12598
+ The vertex key to minimise. If set the vertices dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value must be numeric. Default is None.
12223
12599
  edgeKey : string , optional
12224
- The edge key to minimise. If set the edges dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value of the key must be numeric. If set to "length" (case insensitive), the shortest path by length is computed. The default is "length".
12600
+ The edge key to minimise. If set the edges dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value of the key must be numeric. If set to "length" (case insensitive), the shortest path by length is computed. Default is "length".
12225
12601
  tolerance : float , optional
12226
- The desired tolerance. The default is 0.0001.
12602
+ The desired tolerance. Default is 0.0001.
12227
12603
 
12228
12604
  Returns
12229
12605
  -------
@@ -12278,15 +12654,15 @@ class Graph:
12278
12654
  vertexB : topologic_core.Vertex
12279
12655
  The second input vertex.
12280
12656
  vertexKey : string , optional
12281
- The vertex key to minimise. If set the vertices dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value must be numeric. The default is None.
12657
+ The vertex key to minimise. If set the vertices dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value must be numeric. Default is None.
12282
12658
  edgeKey : string , optional
12283
- The edge key to minimise. If set the edges dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value of the key must be numeric. If set to "length" (case insensitive), the shortest path by length is computed. The default is "length".
12659
+ The edge key to minimise. If set the edges dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value of the key must be numeric. If set to "length" (case insensitive), the shortest path by length is computed. Default is "length".
12284
12660
  timeLimit : int , optional
12285
- The search time limit in seconds. The default is 10 seconds
12661
+ The search time limit in seconds. Default is 10 seconds
12286
12662
  pathLimit: int , optional
12287
- The number of found paths limit. The default is 10 paths.
12663
+ The number of found paths limit. Default is 10 paths.
12288
12664
  tolerance : float , optional
12289
- The desired tolerance. The default is 0.0001.
12665
+ The desired tolerance. Default is 0.0001.
12290
12666
 
12291
12667
  Returns
12292
12668
  -------
@@ -12389,14 +12765,14 @@ class Graph:
12389
12765
  *graphs : topologic_core.Graph
12390
12766
  One or more toplogic_core.graph objects.
12391
12767
  sagitta : float , optional
12392
- The length of the sagitta. In mathematics, the sagitta is the line connecting the center of a chord to the apex (or highest point) of the arc subtended by that chord. The default is 0 which means a straight edge is drawn instead of an arc. The default is 0.
12768
+ The length of the sagitta. In mathematics, the sagitta is the line connecting the center of a chord to the apex (or highest point) of the arc subtended by that chord. Default is 0 which means a straight edge is drawn instead of an arc. Default is 0.
12393
12769
  absolute : bool , optional
12394
- If set to True, the sagitta length is treated as an absolute value. Otherwise, it is treated as a ratio based on the length of the edge. The default is False.
12395
- For example, if the length of the edge is 10, the sagitta is set to 0.5, and absolute is set to False, the sagitta length will be 5. The default is True.
12770
+ If set to True, the sagitta length is treated as an absolute value. Otherwise, it is treated as a ratio based on the length of the edge. Default is False.
12771
+ For example, if the length of the edge is 10, the sagitta is set to 0.5, and absolute is set to False, the sagitta length will be 5. Default is True.
12396
12772
  sides : int , optional
12397
- The number of sides of the arc. The default is 8.
12773
+ The number of sides of the arc. Default is 8.
12398
12774
  angle : float, optional
12399
- An additional angle in degrees to rotate arcs (where sagitta is more than 0). The default is 0.
12775
+ An additional angle in degrees to rotate arcs (where sagitta is more than 0). Default is 0.
12400
12776
  vertexColor : str , optional
12401
12777
  The desired color of the output vertices. This can be any plotly color string and may be specified as:
12402
12778
  - A hex string (e.g. '#ff0000')
@@ -12406,27 +12782,27 @@ class Graph:
12406
12782
  - A named CSS color.
12407
12783
  The default is "black".
12408
12784
  vertexColorKey : str , optional
12409
- The dictionary key under which to find the vertex color. The default is None.
12785
+ The dictionary key under which to find the vertex color. Default is None.
12410
12786
  vertexSize : float , optional
12411
- The desired size of the vertices. The default is 1.1.
12787
+ The desired size of the vertices. Default is 1.1.
12412
12788
  vertexSizeKey : str , optional
12413
- The dictionary key under which to find the vertex size. The default is None.
12789
+ The dictionary key under which to find the vertex size. Default is None.
12414
12790
  vertexLabelKey : str , optional
12415
- The dictionary key to use to display the vertex label. The default is None.
12791
+ The dictionary key to use to display the vertex label. Default is None.
12416
12792
  vertexGroupKey : str , optional
12417
- The dictionary key to use to display the vertex group. The default is None.
12793
+ The dictionary key to use to display the vertex group. Default is None.
12418
12794
  vertexGroups : list , optional
12419
- The list of vertex groups against which to index the color of the vertex. The default is [].
12795
+ The list of vertex groups against which to index the color of the vertex. Default is [].
12420
12796
  vertexMinGroup : int or float , optional
12421
- For numeric vertexGroups, vertexMinGroup is the desired minimum value for the scaling of colors. This should match the type of value associated with the vertexGroupKey. If set to None, it is set to the minimum value in vertexGroups. The default is None.
12797
+ For numeric vertexGroups, vertexMinGroup is the desired minimum value for the scaling of colors. This should match the type of value associated with the vertexGroupKey. If set to None, it is set to the minimum value in vertexGroups. Default is None.
12422
12798
  vertexMaxGroup : int or float , optional
12423
- For numeric vertexGroups, vertexMaxGroup is the desired maximum value for the scaling of colors. This should match the type of value associated with the vertexGroupKey. If set to None, it is set to the maximum value in vertexGroups. The default is None.
12799
+ For numeric vertexGroups, vertexMaxGroup is the desired maximum value for the scaling of colors. This should match the type of value associated with the vertexGroupKey. If set to None, it is set to the maximum value in vertexGroups. Default is None.
12424
12800
  showVertices : bool , optional
12425
- If set to True the vertices will be drawn. Otherwise, they will not be drawn. The default is True.
12801
+ If set to True the vertices will be drawn. Otherwise, they will not be drawn. Default is True.
12426
12802
  showVertexLabel : bool , optional
12427
- If set to True, the vertex labels are shown permenantely on screen. Otherwise, they are not. The default is False.
12803
+ If set to True, the vertex labels are shown permenantely on screen. Otherwise, they are not. Default is False.
12428
12804
  showVertexLegend : bool , optional
12429
- If set to True the vertex legend will be drawn. Otherwise, it will not be drawn. The default is False.
12805
+ If set to True the vertex legend will be drawn. Otherwise, it will not be drawn. Default is False.
12430
12806
  edgeColor : str , optional
12431
12807
  The desired color of the output edges. This can be any plotly color string and may be specified as:
12432
12808
  - A hex string (e.g. '#ff0000')
@@ -12436,43 +12812,43 @@ class Graph:
12436
12812
  - A named CSS color.
12437
12813
  The default is "black".
12438
12814
  edgeColorKey : str , optional
12439
- The dictionary key under which to find the edge color. The default is None.
12815
+ The dictionary key under which to find the edge color. Default is None.
12440
12816
  edgeWidth : float , optional
12441
- The desired thickness of the output edges. The default is 1.
12817
+ The desired thickness of the output edges. Default is 1.
12442
12818
  edgeWidthKey : str , optional
12443
- The dictionary key under which to find the edge width. The default is None.
12819
+ The dictionary key under which to find the edge width. Default is None.
12444
12820
  edgeLabelKey : str , optional
12445
- The dictionary key to use to display the edge label. The default is None.
12821
+ The dictionary key to use to display the edge label. Default is None.
12446
12822
  edgeGroupKey : str , optional
12447
- The dictionary key to use to display the edge group. The default is None.
12823
+ The dictionary key to use to display the edge group. Default is None.
12448
12824
  edgeGroups : list , optional
12449
- The list of edge groups against which to index the color of the edge. The default is [].
12825
+ The list of edge groups against which to index the color of the edge. Default is [].
12450
12826
  edgeMinGroup : int or float , optional
12451
- For numeric edgeGroups, edgeMinGroup is the desired minimum value for the scaling of colors. This should match the type of value associated with the edgeGroupKey. If set to None, it is set to the minimum value in edgeGroups. The default is None.
12827
+ For numeric edgeGroups, edgeMinGroup is the desired minimum value for the scaling of colors. This should match the type of value associated with the edgeGroupKey. If set to None, it is set to the minimum value in edgeGroups. Default is None.
12452
12828
  edgeMaxGroup : int or float , optional
12453
- For numeric edgeGroups, edgeMaxGroup is the desired maximum value for the scaling of colors. This should match the type of value associated with the edgeGroupKey. If set to None, it is set to the maximum value in edgeGroups. The default is None.
12829
+ For numeric edgeGroups, edgeMaxGroup is the desired maximum value for the scaling of colors. This should match the type of value associated with the edgeGroupKey. If set to None, it is set to the maximum value in edgeGroups. Default is None.
12454
12830
  showEdges : bool , optional
12455
- If set to True the edges will be drawn. Otherwise, they will not be drawn. The default is True.
12831
+ If set to True the edges will be drawn. Otherwise, they will not be drawn. Default is True.
12456
12832
  showEdgeLabel : bool , optional
12457
- If set to True, the edge labels are shown permenantely on screen. Otherwise, they are not. The default is False.
12833
+ If set to True, the edge labels are shown permenantely on screen. Otherwise, they are not. Default is False.
12458
12834
  showEdgeLegend : bool , optional
12459
- If set to True the edge legend will be drawn. Otherwise, it will not be drawn. The default is False.
12835
+ If set to True the edge legend will be drawn. Otherwise, it will not be drawn. Default is False.
12460
12836
  colorScale : str , optional
12461
- The desired type of plotly color scales to use (e.g. "Viridis", "Plasma"). The default is "Viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
12837
+ The desired type of plotly color scales to use (e.g. "Viridis", "Plasma"). Default is "Viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
12462
12838
  renderer : str , optional
12463
- The desired renderer. See Plotly.Renderers(). If set to None, the code will attempt to discover the most suitable renderer. The default is None.
12839
+ The desired renderer. See Plotly.Renderers(). If set to None, the code will attempt to discover the most suitable renderer. Default is None.
12464
12840
  width : int , optional
12465
12841
  The width in pixels of the figure. The default value is 950.
12466
12842
  height : int , optional
12467
12843
  The height in pixels of the figure. The default value is 950.
12468
12844
  xAxis : bool , optional
12469
- If set to True the x axis is drawn. Otherwise it is not drawn. The default is False.
12845
+ If set to True the x axis is drawn. Otherwise it is not drawn. Default is False.
12470
12846
  yAxis : bool , optional
12471
- If set to True the y axis is drawn. Otherwise it is not drawn. The default is False.
12847
+ If set to True the y axis is drawn. Otherwise it is not drawn. Default is False.
12472
12848
  zAxis : bool , optional
12473
- If set to True the z axis is drawn. Otherwise it is not drawn. The default is False.
12849
+ If set to True the z axis is drawn. Otherwise it is not drawn. Default is False.
12474
12850
  axisSize : float , optional
12475
- The size of the X, Y, Z, axes. The default is 1.
12851
+ The size of the X, Y, Z, axes. Default is 1.
12476
12852
  backgroundColor : str , optional
12477
12853
  The desired color of the background. This can be any plotly color string and may be specified as:
12478
12854
  - A hex string (e.g. '#ff0000')
@@ -12490,17 +12866,17 @@ class Graph:
12490
12866
  marginBottom : int , optional
12491
12867
  The size in pixels of the bottom margin. The default value is 0.
12492
12868
  camera : list , optional
12493
- The desired location of the camera). The default is [-1.25, -1.25, 1.25].
12869
+ The desired location of the camera). Default is [-1.25, -1.25, 1.25].
12494
12870
  center : list , optional
12495
- The desired center (camera target). The default is [0, 0, 0].
12871
+ The desired center (camera target). Default is [0, 0, 0].
12496
12872
  up : list , optional
12497
- The desired up vector. The default is [0, 0, 1].
12873
+ The desired up vector. Default is [0, 0, 1].
12498
12874
  projection : str , optional
12499
- The desired type of projection. The options are "orthographic" or "perspective". It is case insensitive. The default is "perspective"
12875
+ The desired type of projection. The options are "orthographic" or "perspective". It is case insensitive. Default is "perspective"
12500
12876
  tolerance : float , optional
12501
- The desired tolerance. The default is 0.0001.
12877
+ The desired tolerance. Default is 0.0001.
12502
12878
  silent : bool , optional
12503
- If set to True, error and warning messages are suppressed. The default is False.
12879
+ If set to True, error and warning messages are suppressed. Default is False.
12504
12880
 
12505
12881
  Returns
12506
12882
  -------
@@ -12590,14 +12966,14 @@ class Graph:
12590
12966
  The input graph.
12591
12967
  vertexKey : str , optional
12592
12968
  The dictionary key under which to store the cut vertex status of each vertex. See https://en.wikipedia.org/wiki/Cut_(graph_theory).
12593
- vertex cuts are indicated with a value of 1. The default is "cutVertex".
12969
+ vertex cuts are indicated with a value of 1. Default is "cutVertex".
12594
12970
  edgeKey : str , optional
12595
12971
  The dictionary key under which to store the cut edge status of each edge. See https://en.wikipedia.org/wiki/Cut_(graph_theory).
12596
- edge cuts are indicated with a value of 1. The default is "cutVertex".
12972
+ edge cuts are indicated with a value of 1. Default is "cutVertex".
12597
12973
  tolerance : float , optional
12598
- The desired tolerance. The default is 0.0001.
12974
+ The desired tolerance. Default is 0.0001.
12599
12975
  silent : bool , optional
12600
- If set to True, error and warning messages are suppressed. The default is False.
12976
+ If set to True, error and warning messages are suppressed. Default is False.
12601
12977
 
12602
12978
  Returns
12603
12979
  -------
@@ -12674,15 +13050,15 @@ class Graph:
12674
13050
  superGraph : topologic_core.Graph
12675
13051
  The input supergraph.
12676
13052
  strict : bool , optional
12677
- If set to True, each subgraph edge must be represented by a single edge in the supergraph. Otherwise, an edge in the subgraph can be represented either with an edge or a path in the supergraph. The default is False.
13053
+ If set to True, each subgraph edge must be represented by a single edge in the supergraph. Otherwise, an edge in the subgraph can be represented either with an edge or a path in the supergraph. Default is False.
12678
13054
  vertexMatcher : callable, optional
12679
13055
  If specified, this function is called to check if two vertices are matched. The format must be vertex_matcher(sub_vertex, super_vertex, mantissa, tolerance) -> bool.
12680
13056
  vertexKey : str , optional
12681
- The dictionary key to use for vertex matching if the vertexMatcher input parameter is set to None. The default is "id".
13057
+ The dictionary key to use for vertex matching if the vertexMatcher input parameter is set to None. Default is "id".
12682
13058
  mantissa : int , optional
12683
- The desired length of the mantissa. The default is 6.
13059
+ The number of decimal places to round the result to. Default is 6.
12684
13060
  tolerance : float , optional
12685
- The desired tolerance. The default is 0.0001.
13061
+ The desired tolerance. Default is 0.0001.
12686
13062
 
12687
13063
  Returns
12688
13064
  -------
@@ -12814,7 +13190,7 @@ class Graph:
12814
13190
  vertexB : topologic_core.Vertex
12815
13191
  The second input vertex.
12816
13192
  tolerance : float , optional
12817
- The desired tolerance. The default is 0.0001.
13193
+ The desired tolerance. Default is 0.0001.
12818
13194
 
12819
13195
  Returns
12820
13196
  -------
@@ -12882,9 +13258,9 @@ class Graph:
12882
13258
  graph : topologic_core.Graph
12883
13259
  The input graph.
12884
13260
  vertex : topologic_core.Vertex , optional
12885
- The input root vertex. If not set, the first vertex in the graph is set as the root vertex. The default is None.
13261
+ The input root vertex. If not set, the first vertex in the graph is set as the root vertex. Default is None.
12886
13262
  tolerance : float , optional
12887
- The desired tolerance. The default is 0.0001.
13263
+ The desired tolerance. Default is 0.0001.
12888
13264
 
12889
13265
  Returns
12890
13266
  -------
@@ -12966,11 +13342,11 @@ class Graph:
12966
13342
  the vertex degree. If a numeric value cannot be retrieved from an edge, a value of 1 is used instead.
12967
13343
  This is used in weighted graphs. if weightKey is set to "Length" or "Distance", the length of the edge will be used as its weight.
12968
13344
  mantissa : int , optional
12969
- The desired length of the mantissa. The default is 6.
13345
+ The number of decimal places to round the result to. Default is 6.
12970
13346
  tolerance : float , optional
12971
- The desired tolerance. The default is 0.0001.
13347
+ The desired tolerance. Default is 0.0001.
12972
13348
  silent : bool , optional
12973
- If set to True, error and warning messages are suppressed. The default is False.
13349
+ If set to True, error and warning messages are suppressed. Default is False.
12974
13350
 
12975
13351
  Returns
12976
13352
  -------
@@ -13016,9 +13392,9 @@ class Graph:
13016
13392
  graph : topologic_core.Graph
13017
13393
  The input graph.
13018
13394
  vertexKey : str , optional
13019
- If set, the returned list of vertices is sorted according to the dicitonary values stored under this key. The default is None.
13395
+ If set, the returned list of vertices is sorted according to the dicitonary values stored under this key. Default is None.
13020
13396
  reverse : bool , optional
13021
- If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. The default is False.
13397
+ If set to True, the vertices are sorted in reverse order (only if vertexKey is set). Otherwise, they are not. Default is False.
13022
13398
 
13023
13399
  Returns
13024
13400
  -------
@@ -13060,11 +13436,11 @@ class Graph:
13060
13436
  face : topologic_core.Face
13061
13437
  The input boundary. View edges will be clipped to this face. The holes in the face are used as the obstacles
13062
13438
  viewpointsA : list , optional
13063
- The first input list of viewpoints (vertices). Visibility edges will connect these veritces to viewpointsB. If set to None, this parameters will be set to all vertices of the input face. The default is None.
13439
+ The first input list of viewpoints (vertices). Visibility edges will connect these veritces to viewpointsB. If set to None, this parameters will be set to all vertices of the input face. Default is None.
13064
13440
  viewpointsB : list , optional
13065
- The input list of viewpoints (vertices). Visibility edges will connect these vertices to viewpointsA. If set to None, this parameters will be set to all vertices of the input face. The default is None.
13441
+ The input list of viewpoints (vertices). Visibility edges will connect these vertices to viewpointsA. If set to None, this parameters will be set to all vertices of the input face. Default is None.
13066
13442
  tolerance : float , optional
13067
- The desired tolerance. The default is 0.0001.
13443
+ The desired tolerance. Default is 0.0001.
13068
13444
 
13069
13445
  Returns
13070
13446
  -------
@@ -13156,15 +13532,15 @@ class Graph:
13156
13532
  vertexB : topologic_core.Vertex
13157
13533
  The second vertex.
13158
13534
  vertexIDKey : str , optional
13159
- The dictionary key under which to find the unique vertex ID. The default is "id".
13535
+ The dictionary key under which to find the unique vertex ID. Default is "id".
13160
13536
  edgeWeightKey : str , optional
13161
13537
  The dictionary key under which to find the weight of the edge for weighted graphs.
13162
13538
  If this parameter is specified as "length" or "distance" then the length of the edge is used as its weight.
13163
13539
  The default is None which means all edges are treated as if they have a weight of 1.
13164
13540
  mantissa : int , optional
13165
- The desired length of the mantissa. The default is 6.
13541
+ The number of decimal places to round the result to. Default is 6.
13166
13542
  silent : bool , optional
13167
- If set to True, error and warning messages are suppressed. The default is False.
13543
+ If set to True, error and warning messages are suppressed. Default is False.
13168
13544
 
13169
13545
  Returns
13170
13546
  -------
@@ -13274,14 +13650,14 @@ class Graph:
13274
13650
  vertexKeys : list or str , optional
13275
13651
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
13276
13652
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
13277
- vertices (within the tolerance) will be used to determine sameness. The default is None.
13653
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
13278
13654
  useCentroid : bool , optional
13279
13655
  If set to True, the coordinates of identical vertices from each graph are averaged to located the new merged vertex of the resulting graph.
13280
- Otherwise, the coordinates of the vertex of the first input graph are used. The default is False.
13656
+ Otherwise, the coordinates of the vertex of the first input graph are used. Default is False.
13281
13657
  tolerance : float , optional
13282
- The desired tolerance. The default is 0.0001.
13658
+ The desired tolerance. Default is 0.0001.
13283
13659
  silent : bool , optional
13284
- If set to True, error and warning messages are suppressed. The default is False.
13660
+ If set to True, error and warning messages are suppressed. Default is False.
13285
13661
 
13286
13662
  Returns
13287
13663
  -------
@@ -13400,14 +13776,14 @@ class Graph:
13400
13776
  vertexKeys : list or str , optional
13401
13777
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
13402
13778
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
13403
- vertices (within the tolerance) will be used to determine sameness. The default is None.
13779
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
13404
13780
  useCentroid : bool , optional
13405
13781
  If set to True, the coordinates of identical vertices from each graph are averaged to located the new merged vertex of the resulting graph.
13406
- Otherwise, the coordinates of the vertex of the second input graph are used. The default is False.
13782
+ Otherwise, the coordinates of the vertex of the second input graph are used. Default is False.
13407
13783
  tolerance : float , optional
13408
- The desired tolerance. The default is 0.0001.
13784
+ The desired tolerance. Default is 0.0001.
13409
13785
  silent : bool , optional
13410
- If set to True, error and warning messages are suppressed. The default is False.
13786
+ If set to True, error and warning messages are suppressed. Default is False.
13411
13787
 
13412
13788
 
13413
13789
  Returns
@@ -13523,14 +13899,14 @@ class Graph:
13523
13899
  vertexKeys : list or str , optional
13524
13900
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
13525
13901
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
13526
- vertices (within the tolerance) will be used to determine sameness. The default is None.
13902
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
13527
13903
  useCentroid : bool , optional
13528
13904
  If set to True, the coordinates of identical vertices from each graph are averaged to located the new merged vertex of the resulting graph.
13529
- Otherwise, the coordinates of the vertex of the first input graph are used. The default is False.
13905
+ Otherwise, the coordinates of the vertex of the first input graph are used. Default is False.
13530
13906
  tolerance : float , optional
13531
- The desired tolerance. The default is 0.0001.
13907
+ The desired tolerance. Default is 0.0001.
13532
13908
  silent : bool , optional
13533
- If set to True, error and warning messages are suppressed. The default is False.
13909
+ If set to True, error and warning messages are suppressed. Default is False.
13534
13910
 
13535
13911
  Returns
13536
13912
  -------
@@ -13632,14 +14008,14 @@ class Graph:
13632
14008
  vertexKeys : list or str , optional
13633
14009
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
13634
14010
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
13635
- vertices (within the tolerance) will be used to determine sameness. The default is None.
14011
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
13636
14012
  useCentroid : bool , optional
13637
14013
  If set to True, the coordinates of identical vertices from each graph are averaged to located the new merged vertex of the resulting graph.
13638
- Otherwise, the coordinates of the vertex of the first input graph are used. The default is False.
14014
+ Otherwise, the coordinates of the vertex of the first input graph are used. Default is False.
13639
14015
  tolerance : float , optional
13640
- The desired tolerance. The default is 0.0001.
14016
+ The desired tolerance. Default is 0.0001.
13641
14017
  silent : bool , optional
13642
- If set to True, error and warning messages are suppressed. The default is False.
14018
+ If set to True, error and warning messages are suppressed. Default is False.
13643
14019
 
13644
14020
  Returns
13645
14021
  -------
@@ -13741,13 +14117,13 @@ class Graph:
13741
14117
  vertexKeys : list or str , optional
13742
14118
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
13743
14119
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
13744
- vertices (within the tolerance) will be used to determine sameness. The default is None.
14120
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
13745
14121
  useCentroid : bool , optional
13746
14122
  This is not used here, but included for API consistency for boolean operations.
13747
14123
  tolerance : float , optional
13748
- The desired tolerance. The default is 0.0001.
14124
+ The desired tolerance. Default is 0.0001.
13749
14125
  silent : bool , optional
13750
- If set to True, error and warning messages are suppressed. The default is False.
14126
+ If set to True, error and warning messages are suppressed. Default is False.
13751
14127
 
13752
14128
  Returns
13753
14129
  -------
@@ -13820,16 +14196,16 @@ class Graph:
13820
14196
  vertexKeys : list or str , optional
13821
14197
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
13822
14198
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
13823
- vertices (within the tolerance) will be used to determine sameness. The default is None.
14199
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
13824
14200
  vertexColorKey : str , optional
13825
- The dictionary key that is storing the vertex's color. The final colors will be averaged. The default is "color".
14201
+ The dictionary key that is storing the vertex's color. The final colors will be averaged. Default is "color".
13826
14202
  useCentroid : bool , optional
13827
14203
  If set to True, the coordinates of identical vertices from each graph are averaged to located the new merged vertex of the resulting graph.
13828
- Otherwise, the coordinates of the vertex of the first input graph are used. The default is False.
14204
+ Otherwise, the coordinates of the vertex of the first input graph are used. Default is False.
13829
14205
  tolerance : float , optional
13830
- The desired tolerance. The default is 0.0001.
14206
+ The desired tolerance. Default is 0.0001.
13831
14207
  silent : bool , optional
13832
- If set to True, error and warning messages are suppressed. The default is False.
14208
+ If set to True, error and warning messages are suppressed. Default is False.
13833
14209
 
13834
14210
  Returns
13835
14211
  -------
@@ -13863,13 +14239,13 @@ class Graph:
13863
14239
  vertexKeys : list or str , optional
13864
14240
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
13865
14241
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
13866
- vertices (within the tolerance) will be used to determine sameness. The default is None.
14242
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
13867
14243
  useCentroid : bool , optional
13868
14244
  This is not used here, but included for API consistency for boolean operations.
13869
14245
  tolerance : float , optional
13870
- The desired tolerance. The default is 0.0001.
14246
+ The desired tolerance. Default is 0.0001.
13871
14247
  silent : bool , optional
13872
- If set to True, error and warning messages are suppressed. The default is False.
14248
+ If set to True, error and warning messages are suppressed. Default is False.
13873
14249
 
13874
14250
  Returns
13875
14251
  -------
@@ -13902,9 +14278,9 @@ class Graph:
13902
14278
  graph : topologic_core.Graph
13903
14279
  The input graph.
13904
14280
  key : str , optional
13905
- The vertex key to use as an initial label. The default is None which means the vertex degree is used instead.
14281
+ The vertex key to use as an initial label. Default is None which means the vertex degree is used instead.
13906
14282
  iterations : int , optional
13907
- The desired number of WL iterations. (non-negative int). The default is 2.
14283
+ The desired number of WL iterations. (non-negative int). Default is 2.
13908
14284
  silent : bool, optional
13909
14285
  If set to True, error and warning messages are suppressed. Default is False.
13910
14286
 
@@ -13962,7 +14338,8 @@ class Graph:
13962
14338
  labels = {i: "0" for i in nbrs}
13963
14339
  else: # Add a vertex degree information.
13964
14340
  _ = Graph.DegreeCentrality(graph, key="_dc_")
13965
- return _initial_labels(graph, key="_dc_")
14341
+ labels, nbrs = _initial_labels(graph, key="_dc_")
14342
+ _ = [Topology.SetDictionary(v, Dictionary.RemoveKey(Topology.Dictionary(v), "_dc_")) for v in Graph.Vertices(graph)]
13966
14343
  return labels, nbrs
13967
14344
 
13968
14345
  def _canonize_string_labels(str_labels):
@@ -14018,13 +14395,13 @@ class Graph:
14018
14395
  graphB : topologic_core.Graph
14019
14396
  The second input graph.
14020
14397
  key : str , optional
14021
- The vertex key to use as an initial label. The default is None which means the vertex degree is used instead.
14398
+ The vertex key to use as an initial label. Default is None which means the vertex degree is used instead.
14022
14399
  iterations : int , optional
14023
- The desired number of WL iterations. (non-negative int). The default is 2.
14400
+ The desired number of WL iterations. (non-negative int). Default is 2.
14024
14401
  normalize : bool , optional
14025
- if set to True, the returned value is normalized between 0 and 1. The default is True.
14402
+ if set to True, the returned value is normalized between 0 and 1. Default is True.
14026
14403
  mantissa : int , optional
14027
- The desired length of the mantissa. The default is 6.
14404
+ The number of decimal places to round the result to. Default is 6.
14028
14405
 
14029
14406
  Returns
14030
14407
  -------
@@ -14071,13 +14448,13 @@ class Graph:
14071
14448
  vertexKeys : list or str , optional
14072
14449
  The vertex dictionary key (str) or keys (list of str) to use to determine if two vertices are the same.
14073
14450
  If the vertexKeys are set to None or "loc" or "coord" or "xyz" (case insensitive), the distance between the
14074
- vertices (within the tolerance) will be used to determine sameness. The default is None.
14451
+ vertices (within the tolerance) will be used to determine sameness. Default is None.
14075
14452
  useCentroid : bool , optional
14076
14453
  This is not used here, but included for API consistency for boolean operations.
14077
14454
  tolerance : float , optional
14078
- The desired tolerance. The default is 0.0001.
14455
+ The desired tolerance. Default is 0.0001.
14079
14456
  silent : bool , optional
14080
- If set to True, error and warning messages are suppressed. The default is False.
14457
+ If set to True, error and warning messages are suppressed. Default is False.
14081
14458
 
14082
14459
  Returns
14083
14460
  -------