// SPDX-FileCopyrightText: 2024 Topola contributors // // SPDX-License-Identifier: MIT use crate::{ geometry::NodeMetadata, graph::{GenericIndex, GetPetgraphIndex}, }; pub trait ManageCompounds { type GeneralIndex: Copy; type EntryLabel: Copy; fn add_compound(&mut self, meta: NodeMetadata, weight: CW) -> GenericIndex; fn remove_compound(&mut self, compound: GenericIndex); fn add_to_compound(&mut self, node: I, label: Self::EntryLabel, compound: GenericIndex) where I: Copy + GetPetgraphIndex; fn compound_weight(&self, node: GenericIndex) -> &CW; fn compound_members( &self, compound: GenericIndex, ) -> impl Iterator + '_; fn compounds(&self, node: I) -> impl Iterator)> where I: Copy + GetPetgraphIndex; }