pub struct BenchmarkGraph<const N: usize> { /* private fields */ }Expand description
A directed graph with N integer objectives per edge, over states
0..nodes, as the suite’s instances are.
Implementations§
Source§impl<const N: usize> BenchmarkGraph<N>
impl<const N: usize> BenchmarkGraph<N>
Sourcepub fn from_arcs(nodes: u32, arcs: &[(u32, u32, [u32; N])]) -> Self
pub fn from_arcs(nodes: u32, arcs: &[(u32, u32, [u32; N])]) -> Self
A graph over nodes states with the arcs (from, to, costs).
§Panics
Panics if an arc names a state >= nodes.
Sourcepub fn node_count(&self) -> u32
pub fn node_count(&self) -> u32
Sourcepub fn project<const M: usize>(
&self,
objectives: [usize; M],
) -> BenchmarkGraph<M>
pub fn project<const M: usize>( &self, objectives: [usize; M], ) -> BenchmarkGraph<M>
The same graph with only the objectives objectives, in that order
(for example the three-, four- and five-objective DIMACS-Extended
variants of one five-objective graph).
§Panics
Panics if an objective index is >= N.
Trait Implementations§
Source§impl<const N: usize> Clone for BenchmarkGraph<N>
impl<const N: usize> Clone for BenchmarkGraph<N>
Source§impl<const N: usize> Debug for BenchmarkGraph<N>
impl<const N: usize> Debug for BenchmarkGraph<N>
impl<const N: usize> Eq for BenchmarkGraph<N>
Source§impl<const N: usize> Graph for BenchmarkGraph<N>
impl<const N: usize> Graph for BenchmarkGraph<N>
Source§impl<const N: usize> PartialEq for BenchmarkGraph<N>
impl<const N: usize> PartialEq for BenchmarkGraph<N>
Source§impl<const N: usize> ReverseGraph for BenchmarkGraph<N>
impl<const N: usize> ReverseGraph for BenchmarkGraph<N>
impl<const N: usize> StructuralPartialEq for BenchmarkGraph<N>
Auto Trait Implementations§
impl<const N: usize> Forget for BenchmarkGraph<N>
impl<const N: usize> Freeze for BenchmarkGraph<N>
impl<const N: usize> Move for BenchmarkGraph<N>
impl<const N: usize> RefUnwindSafe for BenchmarkGraph<N>
impl<const N: usize> Send for BenchmarkGraph<N>
impl<const N: usize> Sync for BenchmarkGraph<N>
impl<const N: usize> Unpin for BenchmarkGraph<N>
impl<const N: usize> UnsafeUnpin for BenchmarkGraph<N>
impl<const N: usize> UnwindSafe for BenchmarkGraph<N>
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