MCPcopy Create free account
hub / github.com/Vegetebird/GraphMLP / __init__

Method __init__

model/block/graph_frames.py:4–18  ·  view source on GitHub ↗
(self,
                 layout,
                 strategy,
                 pad=0,
                 max_hop=1,
                 dilation=1)

Source from the content-addressed store, hash-verified

2
3class Graph():
4 def __init__(self,
5 layout,
6 strategy,
7 pad=0,
8 max_hop=1,
9 dilation=1):
10
11 self.max_hop = max_hop
12 self.dilation = dilation
13 self.seqlen = pad
14 self.get_edge(layout)
15 self.hop_dis = get_hop_distance(self.num_node, self.edge, max_hop=max_hop)
16
17 self.dist_center = self.get_distance_to_center(layout)
18 self.get_adjacency(strategy)
19
20 def get_distance_to_center(self,layout):
21 dist_center = np.zeros(self.num_node)

Callers

nothing calls this directly

Calls 4

get_edgeMethod · 0.95
get_adjacencyMethod · 0.95
get_hop_distanceFunction · 0.85

Tested by

no test coverage detected