pub struct TypedGraphBuilder {
    pub min_degree: Option<usize>,
    pub graph_id: GraphId,
}
Expand description

In the TypedGraph world, we use the type NodeLabel as an alias for the NodeId type. Internally we represent node ids with u32s of 0…n.

Fields§

§min_degree: Option<usize>§graph_id: GraphId

Trait Implementations§

source§

impl GraphBuilderBase for TypedGraphBuilder

source§

impl GraphBuilderBaseWithPreProcessing for TypedGraphBuilder

source§

fn pre_process_rows( &mut self, data: Vec<<Self as GraphBuilderBase>::RowType> ) -> CLQResult<Vec<<Self as GraphBuilderBase>::RowType>>

source§

impl TypedGraphBuilderBase for TypedGraphBuilder

source§

fn create_graph( nodes: FxHashMap<u32, Node>, core_ids: Vec<u32>, non_core_ids: Vec<u32>, labels_map: FxHashMap<NodeLabel, u32> ) -> CLQResult<TypedGraph>

source§

fn populate_edges( rows: &[EdgeRow], node_map: &mut FxHashMap<u32, Node>, labels_map: &FxHashMap<NodeLabel, u32> ) -> CLQResult<()>

given a set of initialized Nodes, populates the respective neighbors fields appropriately.
source§

fn init_nodes( core_ids: &[NodeLabel], non_core_ids: &[NodeLabel], non_core_type_ids: &HashMap<NodeLabel, NodeTypeId> ) -> (FxHashMap<u32, Node>, FxHashMap<NodeLabel, u32>, Vec<u32>, Vec<u32>)

source§

fn trim_edges( node_map: &mut FxHashMap<u32, Node>, min_degree: &usize ) -> HashSet<u32>

Trims edges greedily, until all edges in the graph have degree at least min_degree. Note that this function does not delete any nodes – just finds nodes to delete. It is called by prune, which actually does the deletion.
source§

fn prune( graph: TypedGraph, rows: &[EdgeRow], min_degree: usize ) -> CLQResult<TypedGraph>

Takes an already-built graph and the edge rows used to create it, returning a new graph, where all nodes are assured to have degree at least min_degree. The provision of a ::GraphType is necessary, since the notion of “degree” does not make sense outside of a graph.
source§

fn get_filtered_sources_targets_rows( graph: TypedGraph, min_degree: usize, rows: &[EdgeRow] ) -> (Vec<NodeLabel>, Vec<NodeLabel>, Vec<EdgeRow>)

called by prune, finds source and target nodes to exclude, as well as edges to exclude when rebuilding the graph from a filtered vector of EdgeRows.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V