Enum CellIdentifier
pub enum CellIdentifier {
Division(VoxelPlainIndex, u64),
Initial(usize),
Inserted(VoxelPlainIndex, u64),
}elli 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§
§impl CellIdentifier
impl CellIdentifier
pub fn new(voxel_plain_index: VoxelPlainIndex, counter: u64) -> CellIdentifier
Available on crate feature cpu_os_threads only.
pub fn new(voxel_plain_index: VoxelPlainIndex, counter: u64) -> CellIdentifier
cpu_os_threads only.Constructs a new CellIdentifier::Division
pub fn new_initial(index: usize) -> CellIdentifier
Available on crate feature cpu_os_threads only.
pub fn new_initial(index: usize) -> CellIdentifier
cpu_os_threads only.Construct a new CellIdentifier::Initial
pub fn new_inserted(
voxel_plain_index: VoxelPlainIndex,
counter: u64,
) -> CellIdentifier
Available on crate feature cpu_os_threads only.
pub fn new_inserted( voxel_plain_index: VoxelPlainIndex, counter: u64, ) -> CellIdentifier
cpu_os_threads only.Construct a new CellIdentifier::Inserted
pub fn __deepcopy__(&self, _memo: Bound<'_, PyDict>) -> CellIdentifier
Available on crate feature cpu_os_threads only.
pub fn __deepcopy__(&self, _memo: Bound<'_, PyDict>) -> CellIdentifier
cpu_os_threads only.Returns an identical clone of the identifier
pub fn copy(&self) -> CellIdentifier
Available on crate feature cpu_os_threads only.
pub fn copy(&self) -> CellIdentifier
cpu_os_threads only.Returns an identical clone of the identifier
pub fn __copy__(&self) -> CellIdentifier
Available on crate feature cpu_os_threads only.
pub fn __copy__(&self) -> CellIdentifier
cpu_os_threads only.Returns an identical clone of the identifier
pub fn __repr__(&self) -> String
Available on crate feature cpu_os_threads only.
pub fn __repr__(&self) -> String
cpu_os_threads only.Formats the CellIdentifier
pub fn __eq__(&self, other: &CellIdentifier) -> bool
Available on crate feature cpu_os_threads only.
pub fn __eq__(&self, other: &CellIdentifier) -> bool
cpu_os_threads only.Performs the == operation.
pub fn __hash__(&self) -> u64
Available on crate feature cpu_os_threads only.
pub fn __hash__(&self) -> u64
cpu_os_threads only.Calculates a hash value of type u64
pub fn __lt__(&self, other: &CellIdentifier) -> bool
Available on crate feature cpu_os_threads only.
pub fn __lt__(&self, other: &CellIdentifier) -> bool
cpu_os_threads only.Performs the < operation
pub fn __getitem__<'py>(
&self,
py: Python<'py>,
key: usize,
) -> Result<Bound<'py, PyAny>, PyErr>
Available on crate feature cpu_os_threads only.
pub fn __getitem__<'py>( &self, py: Python<'py>, key: usize, ) -> Result<Bound<'py, PyAny>, PyErr>
cpu_os_threads only.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§
§impl Clone for CellIdentifier
impl Clone for CellIdentifier
§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 more§impl Debug for CellIdentifier
impl Debug for CellIdentifier
§impl<'de> Deserialize<'de> for CellIdentifier
impl<'de> Deserialize<'de> for CellIdentifier
§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>,
§impl Hash for CellIdentifier
impl Hash for CellIdentifier
§impl IntoPy<Py<PyAny>> for CellIdentifier
impl IntoPy<Py<PyAny>> for CellIdentifier
§impl<'py> IntoPyObject<'py> for CellIdentifier
impl<'py> IntoPyObject<'py> for CellIdentifier
§type Target = CellIdentifier
type Target = CellIdentifier
§type Output = Bound<'py, <CellIdentifier as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <CellIdentifier as IntoPyObject<'py>>::Target>
§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>
§impl Ord for CellIdentifier
impl Ord for CellIdentifier
§impl PartialEq for CellIdentifier
impl PartialEq for CellIdentifier
§impl PartialOrd for CellIdentifier
impl PartialOrd for CellIdentifier
§impl PyClass for CellIdentifier
impl PyClass for CellIdentifier
§impl PyTypeInfo for CellIdentifier
impl PyTypeInfo for CellIdentifier
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
PyTypeInfo::type_objectPyTypeInfo::type_object].§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
PyTypeInfo::is_type_ofPyTypeInfo::is_type_of].§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
PyTypeInfo::is_exact_type_ofPyTypeInfo::is_exact_type_of].§impl Serialize for CellIdentifier
impl Serialize for CellIdentifier
§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,
§impl<T> FromPyObject<'_> for Twhere
T: PyClass + Clone,
impl<T> FromPyObject<'_> for Twhere
T: PyClass + Clone,
§fn extract_bound(obj: &Bound<'_, PyAny>) -> Result<T, PyErr>
fn extract_bound(obj: &Bound<'_, PyAny>) -> Result<T, PyErr>
§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
§fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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 more§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§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.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.