[][src]Struct rs_graph::dimacs::maxflow::Instance

pub struct Instance<G, F, N> where
    G: for<'a> IndexGraph<'a, Node = N>, 
{ pub graph: G, pub src: N, pub snk: N, pub upper: Vec<F>, }

A maxflow instance.

Fields

graph: G

The graph.

src: N

The source node.

snk: N

The sink node.

upper: Vec<F>

The upper bounds.

Methods

impl<G, F, N> Instance<G, F, N> where
    G: for<'a> IndexGraph<'a, Node = N> + Buildable,
    F: FromPrimitive,
    N: Copy + Eq
[src]

pub fn read(fname: &str) -> Result<Self, DimacsError>[src]

Read DIMACS file and return instance.

  • fname is the name of the file to be read

pub fn read_from_buf<R>(buf: &mut R) -> Result<Self, DimacsError> where
    R: BufRead
[src]

Read DIMACS file from a buffered reader and return instance.

  • buf the buffer with the file content

Auto Trait Implementations

impl<G, F, N> RefUnwindSafe for Instance<G, F, N> where
    F: RefUnwindSafe,
    G: RefUnwindSafe,
    N: RefUnwindSafe

impl<G, F, N> Send for Instance<G, F, N> where
    F: Send,
    G: Send,
    N: Send

impl<G, F, N> Sync for Instance<G, F, N> where
    F: Sync,
    G: Sync,
    N: Sync

impl<G, F, N> Unpin for Instance<G, F, N> where
    F: Unpin,
    G: Unpin,
    N: Unpin

impl<G, F, N> UnwindSafe for Instance<G, F, N> where
    F: UnwindSafe,
    G: UnwindSafe,
    N: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.