pub struct SparseCostMatrix { /* private fields */ }
Implementations§
source§impl SparseCostMatrix
impl SparseCostMatrix
pub fn new() -> Self
pub fn get(&self, xy: RoomXY) -> u8
pub fn set(&mut self, xy: RoomXY, val: u8)
pub fn iter(&self) -> impl Iterator<Item = (RoomXY, u8)> + '_
pub fn iter_mut(&mut self) -> impl Iterator<Item = (RoomXY, &mut u8)>
pub fn merge_from_dense(&mut self, src: &LocalCostMatrix)
pub fn merge_from_sparse(&mut self, src: &SparseCostMatrix)
Trait Implementations§
source§impl Clone for SparseCostMatrix
impl Clone for SparseCostMatrix
source§fn clone(&self) -> SparseCostMatrix
fn clone(&self) -> SparseCostMatrix
Returns a copy 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 CostMatrixGet for SparseCostMatrix
impl CostMatrixGet for SparseCostMatrix
source§impl CostMatrixSet for SparseCostMatrix
impl CostMatrixSet for SparseCostMatrix
source§impl Debug for SparseCostMatrix
impl Debug for SparseCostMatrix
source§impl Default for SparseCostMatrix
impl Default for SparseCostMatrix
source§impl<'de> Deserialize<'de> for SparseCostMatrix
impl<'de> Deserialize<'de> for SparseCostMatrix
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&CostMatrix> for SparseCostMatrix
impl From<&CostMatrix> for SparseCostMatrix
source§fn from(js_matrix: &CostMatrix) -> Self
fn from(js_matrix: &CostMatrix) -> Self
Converts to this type from the input type.
source§impl From<&LocalCostMatrix> for SparseCostMatrix
impl From<&LocalCostMatrix> for SparseCostMatrix
source§fn from(lcm: &LocalCostMatrix) -> Self
fn from(lcm: &LocalCostMatrix) -> Self
Converts to this type from the input type.
source§impl From<&SparseCostMatrix> for LocalCostMatrix
impl From<&SparseCostMatrix> for LocalCostMatrix
source§fn from(scm: &SparseCostMatrix) -> Self
fn from(scm: &SparseCostMatrix) -> Self
Converts to this type from the input type.
source§impl From<SparseCostMatrix> for LocalCostMatrix
impl From<SparseCostMatrix> for LocalCostMatrix
source§fn from(scm: SparseCostMatrix) -> Self
fn from(scm: SparseCostMatrix) -> Self
Converts to this type from the input type.
source§impl PartialEq for SparseCostMatrix
impl PartialEq for SparseCostMatrix
source§fn eq(&self, other: &SparseCostMatrix) -> bool
fn eq(&self, other: &SparseCostMatrix) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SparseCostMatrix
impl Serialize for SparseCostMatrix
impl Eq for SparseCostMatrix
impl StructuralPartialEq for SparseCostMatrix
Auto Trait Implementations§
impl Freeze for SparseCostMatrix
impl RefUnwindSafe for SparseCostMatrix
impl Send for SparseCostMatrix
impl Sync for SparseCostMatrix
impl Unpin for SparseCostMatrix
impl UnwindSafe for SparseCostMatrix
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