Skip to main content

HypergraphProjection

Struct HypergraphProjection 

Source
pub struct HypergraphProjection { /* private fields */ }
Expand description

Materialized directed hypergraph projection.

This view exposes OxGraph canonical topology through oxgraph-hyper traits. Its physical arrays are BCSR-shaped: relation-major participant arrays plus vertex-major incoming/outgoing hyperedge arrays.

§Performance

Cloning is O(v + h + p) for vertices, hyperedges, and participants.

Implementations§

Source§

impl HypergraphProjection

Source

pub const fn definition(&self) -> &HypergraphProjectionDefinition

Returns the definition used for this projection.

§Performance

This method is O(1).

Trait Implementations§

Source§

impl CanonicalElementIdentity for HypergraphProjection

Source§

type CanonicalElementId = ElementId

Canonical element ID guaranteed by this view. Read more
Source§

fn canonical_element_id( &self, element: Self::ElementId, ) -> Self::CanonicalElementId

Returns the canonical ID for a visible local element. Read more
Source§

impl CanonicalIncidenceIdentity for HypergraphProjection

Source§

type CanonicalIncidenceId = IncidenceId

Canonical incidence ID guaranteed by this view. Read more
Source§

fn canonical_incidence_id( &self, incidence: Self::IncidenceId, ) -> Self::CanonicalIncidenceId

Returns the canonical ID for a visible local incidence. Read more
Source§

impl CanonicalRelationIdentity for HypergraphProjection

Source§

type CanonicalRelationId = RelationId

Canonical relation ID guaranteed by this view. Read more
Source§

fn canonical_relation_id( &self, relation: Self::RelationId, ) -> Self::CanonicalRelationId

Returns the canonical ID for a visible local relation. Read more
Source§

impl Clone for HypergraphProjection

Source§

fn clone(&self) -> HypergraphProjection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ContainsElement for HypergraphProjection

Source§

fn contains_element(&self, element: Self::ElementId) -> bool

Returns whether element is valid and visible in this view. Read more
Source§

impl ContainsIncidence for HypergraphProjection

Source§

fn contains_incidence(&self, incidence: Self::IncidenceId) -> bool

Returns whether incidence is valid and visible in this view. Read more
Source§

impl ContainsRelation for HypergraphProjection

Source§

fn contains_relation(&self, relation: Self::RelationId) -> bool

Returns whether relation is valid and visible in this view. Read more
Source§

impl Debug for HypergraphProjection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DirectedHyperedgeIncidences for HypergraphProjection

Source§

type SourceIncidences<'view> = Copied<Iter<'view, ProjectionIncidenceId>> where Self: 'view

Iterator over source-side participant incidence IDs.
Source§

type TargetIncidences<'view> = Copied<Iter<'view, ProjectionIncidenceId>> where Self: 'view

Iterator over target-side participant incidence IDs.
Source§

fn source_incidences( &self, hyperedge: Self::RelationId, ) -> Self::SourceIncidences<'_>

Returns source-side participant incidence IDs for hyperedge.
Source§

fn target_incidences( &self, hyperedge: Self::RelationId, ) -> Self::TargetIncidences<'_>

Returns target-side participant incidence IDs for hyperedge.
Source§

impl DirectedHyperedgeParticipants for HypergraphProjection

Source§

type SourceParticipants<'view> = Copied<Iter<'view, ProjectionElementId>> where Self: 'view

Iterator over source-side participants in one directed hyperedge.
Source§

type TargetParticipants<'view> = Copied<Iter<'view, ProjectionElementId>> where Self: 'view

Iterator over target-side participants in one directed hyperedge.
Source§

fn source_participants( &self, hyperedge: Self::RelationId, ) -> Self::SourceParticipants<'_>

Returns source-side participants for hyperedge.
Source§

fn target_participants( &self, hyperedge: Self::RelationId, ) -> Self::TargetParticipants<'_>

Returns target-side participants for hyperedge.
Source§

impl DirectedVertexHyperedges for HypergraphProjection

Source§

type OutgoingHyperedges<'view> = Copied<Iter<'view, ProjectionRelationId>> where Self: 'view

Iterator over hyperedges where the vertex is source-side.
Source§

type IncomingHyperedges<'view> = Copied<Iter<'view, ProjectionRelationId>> where Self: 'view

Iterator over hyperedges where the vertex is target-side.
Source§

fn outgoing_hyperedges( &self, vertex: Self::ElementId, ) -> Self::OutgoingHyperedges<'_>

Returns hyperedges where vertex participates on the source side.
Source§

fn incoming_hyperedges( &self, vertex: Self::ElementId, ) -> Self::IncomingHyperedges<'_>

Returns hyperedges where vertex participates on the target side.
Source§

impl ElementIncidenceCount for HypergraphProjection

Source§

fn element_incidence_count(&self, element: Self::ElementId) -> usize

Returns the number of incidences attached to element. Read more
Source§

impl ElementIncidences for HypergraphProjection

Source§

type Incidences<'view> = Copied<Iter<'view, ProjectionIncidenceId>> where Self: 'view

Iterator over incidence IDs for one element. Read more
Source§

fn element_incidences(&self, element: Self::ElementId) -> Self::Incidences<'_>

Returns incidences attached to element. Read more
Source§

impl ElementIndex for HypergraphProjection

Source§

fn element_bound(&self) -> usize

Returns the exclusive upper bound for element indexes in this view. Read more
Source§

fn element_index(&self, element: Self::ElementId) -> usize

Returns the dense index for element in this view. Read more
Source§

impl ElementPredecessors for HypergraphProjection

Source§

type Predecessors<'view> = Copied<Iter<'view, ProjectionElementId>> where Self: 'view

Iterator over predecessor element IDs reaching one element. Read more
Source§

fn element_predecessors( &self, element: Self::ElementId, ) -> Self::Predecessors<'_>

Returns elements that reach element through outgoing connections. Read more
Source§

impl ElementSuccessors for HypergraphProjection

Source§

type Successors<'view> = Copied<Iter<'view, ProjectionElementId>> where Self: 'view

Iterator over successor element IDs reached from one element. Read more
Source§

fn element_successors(&self, element: Self::ElementId) -> Self::Successors<'_>

Returns elements reachable through outgoing connections from element. Read more
Source§

impl Eq for HypergraphProjection

Source§

impl HyperedgeParticipants for HypergraphProjection

Source§

type Participants<'view> = HyperedgeParticipants<'view> where Self: 'view

Iterator over vertices participating in one hyperedge.
Source§

fn hyperedge_participants( &self, hyperedge: Self::RelationId, ) -> Self::Participants<'_>

Returns vertices participating in hyperedge.
Source§

impl HypergraphCounts for HypergraphProjection

Source§

fn vertex_count(&self) -> usize

Returns the number of vertices visible in this hypergraph view.
Source§

fn hyperedge_count(&self) -> usize

Returns the number of hyperedges visible in this hypergraph view.
Source§

impl IncidenceBase for HypergraphProjection

Source§

type IncidenceId = ProjectionIncidenceId

Identity of one element’s participation in one relation. Read more
Source§

type Role = RoleId

Implementation-defined participation role. Read more
Source§

impl IncidenceCounts for HypergraphProjection

Source§

fn incidence_count(&self) -> usize

Returns the number of incidences visible in this topology view. Read more
Source§

impl IncidenceElement for HypergraphProjection

Source§

fn incidence_element(&self, incidence: Self::IncidenceId) -> Self::ElementId

Returns the element participating through incidence. Read more
Source§

impl IncidenceIndex for HypergraphProjection

Source§

fn incidence_bound(&self) -> usize

Returns the exclusive upper bound for incidence indexes in this view. Read more
Source§

fn incidence_index(&self, incidence: Self::IncidenceId) -> usize

Returns the dense index for incidence in this view. Read more
Source§

impl IncidenceRelation for HypergraphProjection

Source§

fn incidence_relation(&self, incidence: Self::IncidenceId) -> Self::RelationId

Returns the relation containing incidence. Read more
Source§

impl IncidenceRole for HypergraphProjection

Source§

fn incidence_role(&self, incidence: Self::IncidenceId) -> Self::Role

Returns the role for incidence. Read more
Source§

impl IncidentHyperedges for HypergraphProjection

Source§

type IncidentHyperedges<'view> = IncidentHyperedgesIter<'view> where Self: 'view

Iterator over hyperedges incident to one vertex.
Source§

fn incident_hyperedges( &self, vertex: Self::ElementId, ) -> Self::IncidentHyperedges<'_>

Returns hyperedges incident to vertex.
Source§

impl LocalElementIdentity for HypergraphProjection

Source§

fn local_element_id( &self, canonical: Self::CanonicalElementId, ) -> Option<Self::ElementId>

Returns the visible local element for canonical, if present. Read more
Source§

impl LocalIncidenceIdentity for HypergraphProjection

Source§

fn local_incidence_id( &self, canonical: Self::CanonicalIncidenceId, ) -> Option<Self::IncidenceId>

Returns the visible local incidence for canonical, if present. Read more
Source§

impl LocalRelationIdentity for HypergraphProjection

Source§

fn local_relation_id( &self, canonical: Self::CanonicalRelationId, ) -> Option<Self::RelationId>

Returns the visible local relation for canonical, if present. Read more
Source§

impl PartialEq for HypergraphProjection

Source§

fn eq(&self, other: &HypergraphProjection) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RelationIncidenceCount for HypergraphProjection

Source§

fn relation_incidence_count(&self, relation: Self::RelationId) -> usize

Returns the number of incidences attached to relation. Read more
Source§

impl RelationIncidences for HypergraphProjection

Source§

type Incidences<'view> = Copied<Iter<'view, ProjectionIncidenceId>> where Self: 'view

Iterator over incidence IDs for one relation. Read more
Source§

fn relation_incidences( &self, relation: Self::RelationId, ) -> Self::Incidences<'_>

Returns incidences attached to relation. Read more
Source§

impl RelationIndex for HypergraphProjection

Source§

fn relation_bound(&self) -> usize

Returns the exclusive upper bound for relation indexes in this view. Read more
Source§

fn relation_index(&self, relation: Self::RelationId) -> usize

Returns the dense index for relation in this view. Read more
Source§

impl StructuralPartialEq for HypergraphProjection

Source§

impl TopologyBase for HypergraphProjection

Source§

type ElementId = ProjectionElementId

Identity of a topology element. Read more
Source§

type RelationId = ProjectionRelationId

Identity of a topology relation. Read more
Source§

impl TopologyCounts for HypergraphProjection

Source§

fn element_count(&self) -> usize

Returns the number of elements visible in this topology view. Read more
Source§

fn relation_count(&self) -> usize

Returns the number of relations visible in this topology view. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ContainsEdge for T

Source§

fn contains_edge(&self, edge: Self::RelationId) -> bool

Returns whether edge is valid and visible in this graph view.
Source§

impl<T> ContainsEndpoint for T

Source§

fn contains_endpoint(&self, endpoint: Self::IncidenceId) -> bool

Returns whether endpoint is valid and visible in this graph view.
Source§

impl<T> ContainsHyperedge for T

Source§

fn contains_hyperedge(&self, hyperedge: Self::RelationId) -> bool

Returns whether hyperedge is valid and visible in this hypergraph view.
Source§

impl<T> ContainsNode for T
where T: ContainsElement,

Source§

fn contains_node(&self, node: Self::ElementId) -> bool

Returns whether node is valid and visible in this graph view.
Source§

impl<T> ContainsParticipant for T

Source§

fn contains_participant(&self, participant: Self::IncidenceId) -> bool

Returns whether participant is valid and visible in this hypergraph view.
Source§

impl<T> ContainsVertex for T
where T: ContainsElement,

Source§

fn contains_vertex(&self, vertex: Self::ElementId) -> bool

Returns whether vertex is valid and visible in this hypergraph view.
Source§

impl<T> DirectedHypergraph for T

Source§

impl<T> DirectedVertexPredecessors for T

Source§

type VertexPredecessors<'view> = <T as ElementPredecessors>::Predecessors<'view> where T: 'view

Iterator over predecessor vertices reaching one target-side vertex.
Source§

fn predecessor_vertices( &self, vertex: <T as TopologyBase>::ElementId, ) -> <T as DirectedVertexPredecessors>::VertexPredecessors<'_>

Returns source-side vertices that can reach vertex.
Source§

impl<T> DirectedVertexSuccessors for T

Source§

type VertexSuccessors<'view> = <T as ElementSuccessors>::Successors<'view> where T: 'view

Iterator over successor vertices reachable from one source-side vertex.
Source§

fn successor_vertices( &self, vertex: <T as TopologyBase>::ElementId, ) -> <T as DirectedVertexSuccessors>::VertexSuccessors<'_>

Returns target-side vertices reachable from vertex.
Source§

impl<T> EdgeIndex for T
where T: RelationIndex,

Source§

fn edge_bound(&self) -> usize

Returns the exclusive upper bound for edge indexes in this graph view.
Source§

fn edge_index(&self, edge: Self::RelationId) -> usize

Returns the dense index for edge in this graph view.
Source§

impl<T> EndpointIndex for T
where T: IncidenceIndex,

Source§

fn endpoint_bound(&self) -> usize

Returns the exclusive upper bound for endpoint indexes in this graph view.
Source§

fn endpoint_index(&self, endpoint: Self::IncidenceId) -> usize

Returns the dense index for endpoint in this graph view.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GraphBase for T
where T: TopologyBase,

Source§

impl<T> HyperedgeIncidences for T

Source§

type ParticipantIds<'view> = <T as RelationIncidences>::Incidences<'view> where T: 'view

Iterator over participant IDs attached to one hyperedge.
Source§

fn hyperedge_incidences( &self, hyperedge: <T as TopologyBase>::RelationId, ) -> <T as HyperedgeIncidences>::ParticipantIds<'_>

Returns participant IDs attached to hyperedge.
Source§

impl<T> HyperedgeIndex for T
where T: RelationIndex,

Source§

fn hyperedge_bound(&self) -> usize

Returns the exclusive upper bound for hyperedge indexes in this view.
Source§

fn hyperedge_index(&self, hyperedge: Self::RelationId) -> usize

Returns the dense index for hyperedge in this view.
Source§

impl<T> HyperedgeParticipantCount for T

Source§

fn hyperedge_participant_count(&self, hyperedge: Self::RelationId) -> usize

Returns the number of participants attached to hyperedge.
Source§

impl<T> Hypergraph for T

Source§

impl<T> HypergraphBase for T
where T: TopologyBase,

Source§

impl<T> IncidenceView for T

Source§

impl<T> IncidentHyperedgeCount for T

Source§

fn incident_hyperedge_count(&self, vertex: Self::ElementId) -> usize

Returns the number of hyperedges incident to vertex.
Source§

impl<T> IncomingNeighborsGraph for T

Source§

type InNeighbors<'view> = <T as ElementPredecessors>::Predecessors<'view> where T: 'view

Iterator over nodes that have incoming edges to one target node.
Source§

fn incoming_neighbors( &self, node: <T as TopologyBase>::ElementId, ) -> <T as IncomingNeighborsGraph>::InNeighbors<'_>

Returns predecessor nodes with incoming edges to node.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NodeIndex for T
where T: ElementIndex,

Source§

fn node_bound(&self) -> usize

Returns the exclusive upper bound for node indexes in this graph view.
Source§

fn node_index(&self, node: Self::ElementId) -> usize

Returns the dense index for node in this graph view.
Source§

impl<T> OutgoingNeighborsGraph for T

Source§

type OutNeighbors<'view> = <T as ElementSuccessors>::Successors<'view> where T: 'view

Iterator over nodes directly reachable from one source node.
Source§

fn outgoing_neighbors( &self, node: <T as TopologyBase>::ElementId, ) -> <T as OutgoingNeighborsGraph>::OutNeighbors<'_>

Returns neighbor nodes reached by outgoing edges from node.
Source§

impl<T> ParticipantBase for T
where T: IncidenceBase,

Source§

impl<T> ParticipantCounts for T
where T: IncidenceCounts,

Source§

fn participant_count(&self) -> usize

Returns the total number of participant records visible in this view.
Source§

impl<T> ParticipantHyperedge for T

Source§

fn participant_hyperedge( &self, participant: Self::IncidenceId, ) -> Self::RelationId

Returns the hyperedge carrying participant.
Source§

impl<T> ParticipantIndex for T
where T: IncidenceIndex,

Source§

fn participant_bound(&self) -> usize

Returns the exclusive upper bound for participant indexes in this view.
Source§

fn participant_index(&self, participant: Self::IncidenceId) -> usize

Returns the dense index for participant in this view.
Source§

impl<T> ParticipantRoleOf for T
where T: IncidenceRole,

Source§

fn participant_role_of(&self, participant: Self::IncidenceId) -> Self::Role

Returns the role recorded for participant.
Source§

impl<T> ParticipantVertex for T

Source§

fn participant_vertex(&self, participant: Self::IncidenceId) -> Self::ElementId

Returns the vertex referenced by participant.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> VertexIncidences for T

Source§

type ParticipantIds<'view> = <T as ElementIncidences>::Incidences<'view> where T: 'view

Iterator over participant IDs attached to one vertex.
Source§

fn vertex_incidences( &self, vertex: <T as TopologyBase>::ElementId, ) -> <T as VertexIncidences>::ParticipantIds<'_>

Returns participant IDs attached to vertex.
Source§

impl<T> VertexIndex for T
where T: ElementIndex,

Source§

fn vertex_bound(&self) -> usize

Returns the exclusive upper bound for vertex indexes in this view.
Source§

fn vertex_index(&self, vertex: Self::ElementId) -> usize

Returns the dense index for vertex in this view.