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§
Sourcetype OutputSymm: Send
type OutputSymm: Send
The type of the result of run_symm.
Required Methods§
Sourcefn run(
graph: impl RandomAccessGraph + Sync,
transpose: impl RandomAccessGraph + Sync,
radial_vertices: Option<AtomicBitVec>,
pl: &mut impl ConcurrentProgressLog,
) -> Self::Output
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 ofgraph. Note that you are responsible for providing a correct transpose. The result of the computation is undefined otherwise. -
radial_vertices: anAtomicBitVecwherev[i]is true if nodeiis to be considered radial vertex. IfNonethe algorithm will use the biggest connected component. -
pl: a progress logger.
Sourcefn run_symm(
graph: impl RandomAccessGraph + Sync,
pl: &mut impl ConcurrentProgressLog,
) -> Self::OutputSymm
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.