pub struct DenseWeights<'view, A, T, Id, I, P>{ /* private fields */ }Expand description
Selected dense primitive weights bound to one axis of a topology view.
A is one of ElementAxis, RelationAxis, or IncidenceAxis;
the per-axis new constructor selects the right topology bound.
§Performance
Weight lookup is O(1).
Implementations§
Source§impl<'view, A, T, Id, I, P> DenseWeights<'view, A, T, Id, I, P>
impl<'view, A, T, Id, I, P> DenseWeights<'view, A, T, Id, I, P>
Sourcepub fn new(
topology: &'view T,
layer: &'view PropertyLayer<Id, I>,
) -> Result<Self, PropertyError>
pub fn new( topology: &'view T, layer: &'view PropertyLayer<Id, I>, ) -> Result<Self, PropertyError>
Selects a dense primitive layer as weights for topology along axis
A (ElementAxis, RelationAxis, or IncidenceAxis).
§Errors
Returns PropertyError if the layer is not A-keyed, dense,
primitive type P, non-null, or long enough.
§Performance
Validation is O(layer.len()) for the null check.
Trait Implementations§
Source§impl<T, Id, I, P> ElementWeight for DenseWeights<'_, ElementAxis, T, Id, I, P>
impl<T, Id, I, P> ElementWeight for DenseWeights<'_, ElementAxis, T, Id, I, P>
Source§impl<T, Id, I, P> IncidenceBase for DenseWeights<'_, IncidenceAxis, T, Id, I, P>
impl<T, Id, I, P> IncidenceBase for DenseWeights<'_, IncidenceAxis, T, Id, I, P>
Source§type IncidenceId = <T as IncidenceBase>::IncidenceId
type IncidenceId = <T as IncidenceBase>::IncidenceId
Identity of one element’s participation in one relation. Read more
Source§impl<T, Id, I, P> IncidenceWeight for DenseWeights<'_, IncidenceAxis, T, Id, I, P>
impl<T, Id, I, P> IncidenceWeight for DenseWeights<'_, IncidenceAxis, T, Id, I, P>
Source§type Weight = <P as ArrowPrimitiveType>::Native
type Weight = <P as ArrowPrimitiveType>::Native
Copyable weight representation attached to each visible incidence. Read more
Source§fn incidence_weight(&self, id: Self::IncidenceId) -> Self::Weight
fn incidence_weight(&self, id: Self::IncidenceId) -> Self::Weight
Returns the weight attached to
incidence. Read moreSource§impl<T, Id, I, P> RelationWeight for DenseWeights<'_, RelationAxis, T, Id, I, P>
impl<T, Id, I, P> RelationWeight for DenseWeights<'_, RelationAxis, T, Id, I, P>
Source§type Weight = <P as ArrowPrimitiveType>::Native
type Weight = <P as ArrowPrimitiveType>::Native
Copyable weight representation attached to each visible relation. Read more
Source§fn relation_weight(&self, id: Self::RelationId) -> Self::Weight
fn relation_weight(&self, id: Self::RelationId) -> Self::Weight
Returns the weight attached to
relation. Read moreSource§impl<T, Id, I, P> TopologyBase for DenseWeights<'_, ElementAxis, T, Id, I, P>
impl<T, Id, I, P> TopologyBase for DenseWeights<'_, ElementAxis, T, Id, I, P>
Source§type RelationId = <T as TopologyBase>::RelationId
type RelationId = <T as TopologyBase>::RelationId
Identity of a topology relation. Read more
Source§impl<T, Id, I, P> TopologyBase for DenseWeights<'_, IncidenceAxis, T, Id, I, P>
impl<T, Id, I, P> TopologyBase for DenseWeights<'_, IncidenceAxis, T, Id, I, P>
Source§type RelationId = <T as TopologyBase>::RelationId
type RelationId = <T as TopologyBase>::RelationId
Identity of a topology relation. Read more
Source§impl<T, Id, I, P> TopologyBase for DenseWeights<'_, RelationAxis, T, Id, I, P>
impl<T, Id, I, P> TopologyBase for DenseWeights<'_, RelationAxis, T, Id, I, P>
Source§type RelationId = <T as TopologyBase>::RelationId
type RelationId = <T as TopologyBase>::RelationId
Identity of a topology relation. Read more
Auto Trait Implementations§
impl<'view, A, T, Id, I, P> Freeze for DenseWeights<'view, A, T, Id, I, P>
impl<'view, A, T, Id, I, P> RefUnwindSafe for DenseWeights<'view, A, T, Id, I, P>where
T: RefUnwindSafe,
A: RefUnwindSafe,
Id: RefUnwindSafe,
I: RefUnwindSafe,
<P as ArrowPrimitiveType>::Native: RefUnwindSafe,
impl<'view, A, T, Id, I, P> Send for DenseWeights<'view, A, T, Id, I, P>
impl<'view, A, T, Id, I, P> Sync for DenseWeights<'view, A, T, Id, I, P>
impl<'view, A, T, Id, I, P> Unpin for DenseWeights<'view, A, T, Id, I, P>
impl<'view, A, T, Id, I, P> UnsafeUnpin for DenseWeights<'view, A, T, Id, I, P>
impl<'view, A, T, Id, I, P> UnwindSafe for DenseWeights<'view, A, T, Id, I, P>where
T: RefUnwindSafe,
A: UnwindSafe,
Id: UnwindSafe,
I: UnwindSafe,
<P as ArrowPrimitiveType>::Native: RefUnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more