Struct pathfinder::Network[][src]

pub struct Network<T: Draw + Hash + Copy> {
    pub hash_map: [Option<T>; 666],
}

Fields

Methods

impl<T: Draw + Hash + Copy> Network<T>
[src]

impl Network<Node>
[src]

Calculates the path from node A to node B.

use pathfinder::{Node, Coordinate, Network};
let b = Node::new("B", Coordinate::new(20,20));
let mut a = Node::new("A", Coordinate::new(0,0));
a.link(&b);
let network = Network::new(vec!(a, b));
let path = network.path("A", "B", &Network::path_shortest_leg);
assert_eq!(path, vec!(a, b));

Returns if the given hash exists in the network.

Trait Implementations

impl<T: Clone + Draw + Hash + Copy> Clone for Network<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy + Draw + Hash + Copy> Copy for Network<T>
[src]

Auto Trait Implementations

impl<T> Send for Network<T> where
    T: Send

impl<T> Sync for Network<T> where
    T: Sync