pub enum CellIdentifier {
Division(VoxelPlainIndex, u64),
Initial(usize),
Inserted(VoxelPlainIndex, u64),
}chili only.Expand description
Unique identifier which is given to every cell in the simulation
The identifier is comprised of the VoxelPlainIndex in which the cell was first spawned. This can be due to initial setup or due to other methods such as division in a cell cycle. The second parameter is a counter which is unique for each voxel. This ensures that each cell obtains a unique identifier over the course of the simulation.
Variants§
Division(VoxelPlainIndex, u64)
Produced from a division process
Initial(usize)
Initially placed inside the simulation
Inserted(VoxelPlainIndex, u64)
Inserted manually by other processes
Implementations§
Source§impl CellIdentifier
impl CellIdentifier
Sourcepub fn new(voxel_plain_index: VoxelPlainIndex, counter: u64) -> CellIdentifier
pub fn new(voxel_plain_index: VoxelPlainIndex, counter: u64) -> CellIdentifier
Constructs a new CellIdentifier::Division
Sourcepub fn new_initial(index: usize) -> CellIdentifier
pub fn new_initial(index: usize) -> CellIdentifier
Construct a new CellIdentifier::Initial
Sourcepub fn new_inserted(
voxel_plain_index: VoxelPlainIndex,
counter: u64,
) -> CellIdentifier
pub fn new_inserted( voxel_plain_index: VoxelPlainIndex, counter: u64, ) -> CellIdentifier
Construct a new CellIdentifier::Inserted
Sourcepub fn __deepcopy__(&self, _memo: Bound<'_, PyDict>) -> CellIdentifier
pub fn __deepcopy__(&self, _memo: Bound<'_, PyDict>) -> CellIdentifier
Returns an identical clone of the identifier
Sourcepub fn copy(&self) -> CellIdentifier
pub fn copy(&self) -> CellIdentifier
Returns an identical clone of the identifier
Sourcepub fn __copy__(&self) -> CellIdentifier
pub fn __copy__(&self) -> CellIdentifier
Returns an identical clone of the identifier
Sourcepub fn __eq__(&self, other: &CellIdentifier) -> bool
pub fn __eq__(&self, other: &CellIdentifier) -> bool
Performs the == operation.
Sourcepub fn __lt__(&self, other: &CellIdentifier) -> bool
pub fn __lt__(&self, other: &CellIdentifier) -> bool
Performs the < operation
Sourcepub fn __getitem__<'py>(
&self,
py: Python<'py>,
key: usize,
) -> Result<Bound<'py, PyAny>, PyErr>
pub fn __getitem__<'py>( &self, py: Python<'py>, key: usize, ) -> Result<Bound<'py, PyAny>, PyErr>
Implementes the __getitem__ method. Since the CellIdentifier is built like a list this
only works for the entires 0 and 1 and will yield an error otherwise
Trait Implementations§
Source§impl Clone for CellIdentifier
impl Clone for CellIdentifier
Source§fn clone(&self) -> CellIdentifier
fn clone(&self) -> CellIdentifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CellIdentifier
impl Debug for CellIdentifier
Source§impl<'de> Deserialize<'de> for CellIdentifier
impl<'de> Deserialize<'de> for CellIdentifier
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CellIdentifier, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CellIdentifier, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for CellIdentifier
impl Hash for CellIdentifier
Source§impl<'py> IntoPyObject<'py> for CellIdentifier
impl<'py> IntoPyObject<'py> for CellIdentifier
Source§type Target = CellIdentifier
type Target = CellIdentifier
Source§type Output = Bound<'py, <CellIdentifier as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <CellIdentifier as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<CellIdentifier as IntoPyObject<'py>>::Output, <CellIdentifier as IntoPyObject<'py>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<CellIdentifier as IntoPyObject<'py>>::Output, <CellIdentifier as IntoPyObject<'py>>::Error>
Source§impl Ord for CellIdentifier
impl Ord for CellIdentifier
Source§fn cmp(&self, other: &CellIdentifier) -> Ordering
fn cmp(&self, other: &CellIdentifier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CellIdentifier
impl PartialEq for CellIdentifier
Source§impl PartialOrd for CellIdentifier
impl PartialOrd for CellIdentifier
Source§impl PyClass for CellIdentifier
impl PyClass for CellIdentifier
Source§impl PyTypeInfo for CellIdentifier
impl PyTypeInfo for CellIdentifier
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Source§impl Serialize for CellIdentifier
impl Serialize for CellIdentifier
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for CellIdentifier
impl Eq for CellIdentifier
impl StructuralPartialEq for CellIdentifier
Auto Trait Implementations§
impl Freeze for CellIdentifier
impl RefUnwindSafe for CellIdentifier
impl Send for CellIdentifier
impl Sync for CellIdentifier
impl Unpin for CellIdentifier
impl UnwindSafe for CellIdentifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromPyObject<'_> for T
impl<T> FromPyObject<'_> for T
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.