pub struct Graph {
pub num_nodes: u32,
pub edges: Vec<(u32, u32, f64)>,
}Expand description
Simple undirected weighted graph for MaxCut problems.
Fields§
§num_nodes: u32Number of vertices (each mapped to one qubit).
edges: Vec<(u32, u32, f64)>Edges as (node_i, node_j, weight) triples. Both directions are
represented by a single entry (undirected).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
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