Struct sqrid::Sqrid [−][src]
pub struct Sqrid<const W: u16, const H: u16, const D: bool, const WORDS: usize, const SIZE: usize> {}Expand description
Sqrid base “factory” type
This struct holds all the generic const parameters required by the other structs. This can be aliased and used as a pseudo-module to ease the creation of the other entites and use of algorithms like BFS.
Implementations
Create new breadth-first iterator
This is used to iterate coordinates in breadth-first order,
from a given origin, using a provided function to evaluate a
given Qa position + Qr direction into the next Qa
position.
Example usage:
type Sqrid = sqrid::sqrid_create!(3, 3, false);
type Qa = sqrid::qa_create!(Sqrid);
for (qa, qr) in Sqrid::bf_iter(sqrid::qaqr_eval, &Qa::CENTER)
.flatten() {
println!("breadth-first qa {} from {}", qa, qr);
}Perform a breadth-first search; see search_qrgrid
Trait Implementations
Auto Trait Implementations
impl<const W: u16, const H: u16, const D: bool, const WORDS: usize, const SIZE: usize> RefUnwindSafe for Sqrid<W, H, D, WORDS, SIZE>
impl<const W: u16, const H: u16, const D: bool, const WORDS: usize, const SIZE: usize> Send for Sqrid<W, H, D, WORDS, SIZE>
impl<const W: u16, const H: u16, const D: bool, const WORDS: usize, const SIZE: usize> Sync for Sqrid<W, H, D, WORDS, SIZE>
Blanket Implementations
Mutably borrows from an owned value. Read more
