pub enum AxisQ {
N = 0,
NE = 1,
SE = 2,
}Expand description
Flat top Hex Direction.
Variants§
Trait Implementations§
Source§impl Axis for AxisQ
impl Axis for AxisQ
Source§type Direction = AxisDQ
type Direction = AxisDQ
For tricks to optimize for undirected graph, and not to regress performance of directed graph.
If the axis is
DIRECTED, should set Self.Source§unsafe fn from_index_unchecked(index: usize) -> Self
unsafe fn from_index_unchecked(index: usize) -> Self
Convert form index.
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§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§const UNDIRECTED_COUNT: usize = _
const UNDIRECTED_COUNT: usize = _
Number of direction. If this axis is not directed, it is
COUNT * 2, otherwise COUNT.Source§impl Ord for AxisQ
impl Ord for AxisQ
Source§impl PartialOrd for AxisQ
impl PartialOrd for AxisQ
impl Copy for AxisQ
impl Eq for AxisQ
impl StructuralPartialEq for AxisQ
Auto Trait Implementations§
impl Freeze for AxisQ
impl RefUnwindSafe for AxisQ
impl Send for AxisQ
impl Sync for AxisQ
impl Unpin for AxisQ
impl UnwindSafe for AxisQ
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.