Level

Trait Level 

Source
pub trait Level: Sync {
    type Output: Send;
    type OutputSymm: Send;

    // Required methods
    fn run(
        graph: impl RandomAccessGraph + Sync,
        transpose: impl RandomAccessGraph + Sync,
        radial_vertices: Option<AtomicBitVec>,
        pl: &mut impl ConcurrentProgressLog,
    ) -> Self::Output;
    fn run_symm(
        graph: impl RandomAccessGraph + Sync,
        pl: &mut impl ConcurrentProgressLog,
    ) -> Self::OutputSymm;
}
Expand description

Trait used to run the ExactSumSweep algorithm.

This trait can be used to run the algorithm either providing a graph and its transpose or using a symmetric graph.

It is implemented by the following structs: All, AllForward, RadiusDiameter, Diameter, and Radius, which correspond to different level of computation, with decreasing cost in term of memory and execution time.

§Examples

See the module documentation.

Required Associated Types§

Source

type Output: Send

The type of the result of run.

Source

type OutputSymm: Send

The type of the result of run_symm.

Required Methods§

Source

fn run( graph: impl RandomAccessGraph + Sync, transpose: impl RandomAccessGraph + Sync, radial_vertices: Option<AtomicBitVec>, pl: &mut impl ConcurrentProgressLog, ) -> Self::Output

Runs the ExactSumSweep algorithm on the specified graph.

§Arguments
  • graph: a graph.

  • transpose: the transpose of graph. Note that you are responsible for providing a correct transpose. The result of the computation is undefined otherwise.

  • radial_vertices: an AtomicBitVec where v[i] is true if node i is to be considered radial vertex. If None the algorithm will use the biggest connected component.

  • pl: a progress logger.

Source

fn run_symm( graph: impl RandomAccessGraph + Sync, pl: &mut impl ConcurrentProgressLog, ) -> Self::OutputSymm

Runs the ExactSumSweep algorithm on the specified symmetric graph.

§Arguments
  • graph: a symmetric graph. Note that you are responsible for the graph being symmetric. The result of the computation is undefined otherwise.

  • pl: a progress logger.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§