pub enum SquareDiagonalAxis {
N,
NE,
E,
SE,
}Expand description
Axis for lattice graph with Square and Diagonal Edge.
Variants§
Trait Implementations§
Source§impl Axis for SquareDiagonalAxis
impl Axis for SquareDiagonalAxis
Source§const UNDIRECTED_COUNT: usize = 8usize
const UNDIRECTED_COUNT: usize = 8usize
Number of direction. If this axis is not directed, it is
COUNT * 2, otherwise COUNT.Source§type Direction = DirectedSquareDiagonalAxis
type Direction = DirectedSquareDiagonalAxis
For tricks to optimize for undirected graph, and not to regress performance of directed graph.
If the axis is
DIRECTED, should set Self.Source§fn backward(self) -> Self::Direction
fn backward(self) -> Self::Direction
To backward direction. It reverses when Axis is
DIRECTED.Source§fn from_direction(dir: Self::Direction) -> Self
fn from_direction(dir: Self::Direction) -> Self
Convert from direction.
Source§unsafe fn from_index_unchecked(index: usize) -> Self
unsafe fn from_index_unchecked(index: usize) -> Self
Convert form index.
Source§fn is_forward_direction(dir: &Self::Direction) -> bool
fn is_forward_direction(dir: &Self::Direction) -> bool
Check the direction is forward for this axis.
Returns true if the direction is
DIRECTED is true, or the index of the axis and direction matches.Source§impl Clone for SquareDiagonalAxis
impl Clone for SquareDiagonalAxis
Source§fn clone(&self) -> SquareDiagonalAxis
fn clone(&self) -> SquareDiagonalAxis
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SquareDiagonalAxis
impl Debug for SquareDiagonalAxis
Source§impl Hash for SquareDiagonalAxis
impl Hash for SquareDiagonalAxis
Source§impl Ord for SquareDiagonalAxis
impl Ord for SquareDiagonalAxis
Source§fn cmp(&self, other: &SquareDiagonalAxis) -> Ordering
fn cmp(&self, other: &SquareDiagonalAxis) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SquareDiagonalAxis
impl PartialEq for SquareDiagonalAxis
Source§impl PartialOrd for SquareDiagonalAxis
impl PartialOrd for SquareDiagonalAxis
impl Copy for SquareDiagonalAxis
impl Eq for SquareDiagonalAxis
impl StructuralPartialEq for SquareDiagonalAxis
Auto Trait Implementations§
impl Freeze for SquareDiagonalAxis
impl RefUnwindSafe for SquareDiagonalAxis
impl Send for SquareDiagonalAxis
impl Sync for SquareDiagonalAxis
impl Unpin for SquareDiagonalAxis
impl UnwindSafe for SquareDiagonalAxis
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> ConstOrValue<T> for T
impl<T> ConstOrValue<T> for T
Source§const IS_CONST_WRAP: bool = false
const IS_CONST_WRAP: bool = false
get wheter the type is const generic wrapper.
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.