-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
202 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class CoreModelContract: | ||
nums: int | list | ||
forces: dict | ||
centers: list | ||
damping_factor: float = 0.9999 |
13 changes: 13 additions & 0 deletions
13
stable_gnn/visualization/contracts/draw_circle_edges_contract.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import matplotlib | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class DrawEdgesContract: | ||
axes: matplotlib.axes.Axes | ||
vertex_coordinates: list[tuple[float, float]] | ||
vertex_size: list | ||
edge_list: list[tuple] | list[list[int]] | ||
edge_color: list | ||
edge_fill_color: list | ||
edge_line_width: list |
14 changes: 14 additions & 0 deletions
14
stable_gnn/visualization/contracts/draw_line_edges_contract.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import matplotlib | ||
import numpy as np | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class DrawLineEdgesContract: | ||
axes: matplotlib.axes.Axes | ||
vertex_coordinates: np.array | ||
vertex_size: list | ||
edge_list: list[tuple] | list[list[int]] | ||
show_arrow: bool | ||
edge_color: list | ||
edge_line_width: list |
14 changes: 14 additions & 0 deletions
14
stable_gnn/visualization/contracts/draw_vertex_contract.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import matplotlib | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class DrawVertexContract: | ||
axes: matplotlib.axes.Axes | ||
vertex_coordinates: list[tuple[float, float]] | ||
vertex_label: list[str] | None | ||
font_size: int | ||
font_family: str | ||
vertex_size: list | ||
vertex_color: list | ||
vertex_line_width: list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from stable_gnn.visualization.config.parameters.defaults import Defaults | ||
from stable_gnn.visualization.contracts.core_model_contract import CoreModelContract | ||
|
||
|
||
class CorePhysicalModel: | ||
__node_attraction = Defaults.node_attraction_key | ||
__node_repulsion = Defaults.node_repulsion_key | ||
__edge_repulsion = Defaults.edge_repulsion_key | ||
__center_of_gravity = Defaults.center_of_gravity_key | ||
|
||
def __init__(self, contract: CoreModelContract): | ||
pass | ||
|
||
def simulate(self, init_position, H, max_iter=Defaults.max_iterations, epsilon=Defaults.epsilon, | ||
delta=Defaults.delta): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters