use crate::{DisplayEdge, DisplayNode, Graph};
use egui::Rect;
use petgraph::{csr::IndexType, EdgeType};
use super::super::layout::LayoutState;
pub trait ForceAlgorithm: Default {
type State: LayoutState + Clone;
fn from_state(state: Self::State) -> Self;
fn step<N, E, Ty, Ix, Dn, De>(&mut self, g: &mut Graph<N, E, Ty, Ix, Dn, De>, view: Rect)
where
N: Clone,
E: Clone,
Ty: EdgeType,
Ix: IndexType,
Dn: DisplayNode<N, E, Ty, Ix>,
De: DisplayEdge<N, E, Ty, Ix, Dn>;
fn state(&self) -> Self::State;
}