pub struct NodeMetadata {
pub hash: NodeHash,
pub coefficient: f64,
pub flags: NodeFlags,
}Expand description
Metadata attached to every DAG node.
This is stored inline in the DagNode and contains all the information
needed for hash-consing, algebraic classification, and simplification.
Note: arity was removed — it always equalled node.children.len().
Callers that need the arity call node.children.len() directly.
Fields§
§hash: NodeHashStructural hash for deduplication lookups.
coefficient: f64Numeric coefficient (e.g. the 3 in 3*x).
Defaults to 1.0 for non-coefficient nodes.
flags: NodeFlagsAlgebraic property flags.
Implementations§
Source§impl NodeMetadata
impl NodeMetadata
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for NodeMetadata
impl<'__de, __Context> BorrowDecode<'__de, __Context> for NodeMetadata
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given [
BorrowDecode]. Read moreSource§impl Clone for NodeMetadata
impl Clone for NodeMetadata
Source§fn clone(&self) -> NodeMetadata
fn clone(&self) -> NodeMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeMetadata
impl Debug for NodeMetadata
Source§impl<__Context> Decode<__Context> for NodeMetadata
impl<__Context> Decode<__Context> for NodeMetadata
Source§impl Encode for NodeMetadata
impl Encode for NodeMetadata
Source§impl PartialEq for NodeMetadata
impl PartialEq for NodeMetadata
Source§fn eq(&self, other: &NodeMetadata) -> bool
fn eq(&self, other: &NodeMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NodeMetadata
Auto Trait Implementations§
impl Freeze for NodeMetadata
impl RefUnwindSafe for NodeMetadata
impl Send for NodeMetadata
impl Sync for NodeMetadata
impl Unpin for NodeMetadata
impl UnsafeUnpin for NodeMetadata
impl UnwindSafe for NodeMetadata
Blanket Implementations§
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