pub struct SquareGraph<N, E, Ix = usize, S = DefaultShape> where
    Ix: IndexType
{ /* private fields */ }
Expand description

Undirected Square Grid Graph. It is has rectangle shape.

Node(i,j+1) - Edge(i,j+1,Horizontal) - Node(i+1,j+1)
  |                                     |
Edge(i,j,Vertical)                     Edge(i+1,j,Vertical)
  |                                     |
Node(i,j)   - Edge(i,j,Horizontal)   - Node(i+1,j)

Implementations

Create a SquareGraph from raw data. It only check whether the size of nodes and edges are correct in debug_assertion.

Create a SquareGraph with the nodes and edges initialized with default.

Creates a SquareGraph with initializing nodes and edges from position.

Get the edge from node.

Get the edge reference form node.

Returns the Node count in the horizontal direction.

Returns the Node count in the vertical direction.

Get a reference to the nodes. [horizontal][vertical]

Get a reference to the horizontal edges. [horizontal][vertical]

Get a reference to the vertical edges. [horizontal][vertical]

Get a mutable reference to the nodes. [horizontal][vertical]

Get a mutable reference to the horizontal edges. [horizontal][vertical]

Get a mutable reference to the vertical edges.

Create a SquareGraph with the edges initialized from position.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

node identifier

edge identifier

The kind edges in the graph.

Return an iterator of the neighbors of node a.

Return an upper bound of the node indices in the graph (suitable for the size of a bitmap). Read more

Convert a to an integer index.

Convert i to a node index. i must be a valid value in the graph.

The associated map type

Create a new visitor map

Reset the visitor map (and resize to new size of graph if needed)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

get wheter the type is const generic wrapper.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.