use core::fmt;
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum BcsrRole {
Head,
Tail,
}
#[derive(Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct BcsrVertexId<VertexIndex>(pub VertexIndex);
impl<VertexIndex> fmt::Debug for BcsrVertexId<VertexIndex>
where
VertexIndex: fmt::Debug,
{
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter
.debug_tuple("BcsrVertexId")
.field(&self.0)
.finish()
}
}
impl<VertexIndex> From<VertexIndex> for BcsrVertexId<VertexIndex> {
fn from(value: VertexIndex) -> Self {
Self(value)
}
}
#[derive(Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct BcsrHyperedgeId<RelationIndex>(pub RelationIndex);
impl<RelationIndex> fmt::Debug for BcsrHyperedgeId<RelationIndex>
where
RelationIndex: fmt::Debug,
{
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter
.debug_tuple("BcsrHyperedgeId")
.field(&self.0)
.finish()
}
}
impl<RelationIndex> From<RelationIndex> for BcsrHyperedgeId<RelationIndex> {
fn from(value: RelationIndex) -> Self {
Self(value)
}
}
#[derive(Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct BcsrParticipantId<IncidenceIndex>(pub IncidenceIndex);
impl<IncidenceIndex> fmt::Debug for BcsrParticipantId<IncidenceIndex>
where
IncidenceIndex: fmt::Debug,
{
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter
.debug_tuple("BcsrParticipantId")
.field(&self.0)
.finish()
}
}