Struct matrixgraph::SimpleGraph [] [src]

pub struct SimpleGraph { /* fields omitted */ }

A simple graph represented by the upper right triangle of an adjacency matrix of fixed size

The cells of the adjacency matrix are assigned values of type Option where a None value represents the absence of an edge.

Methods

impl SimpleGraph
[src]

Creates a new simple graph object with a fixed size.

Creates a new simple graph object with a fixed size from a vector that is the row-wise representation of the upper right triangle of an adjacency matrix.

Note: A zero-sized vector creates a graph with a single vertex.

Returns the vector that is the row-wise representation of the upper right triangle of the adjacency matrix of the simple graph.

Returns the vector that is the row-wise representation of the full adjacency matrix of the simple graph.

Trait Implementations

impl PartialEq for SimpleGraph
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for SimpleGraph
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for SimpleGraph
[src]

Formats the value using the given formatter.

impl BasicGraphMethods for SimpleGraph
[src]

Returns the size of the graph, i.e. its number of vertices.

Returns the value of an edge of the graph.

Sets the value of an edge of the graph.