pub enum SymbolType {
Scalar,
Matrix,
Operator,
Quaternion,
}Expand description
Type of symbol (determines commutativity)
Symbols can represent different mathematical objects with different algebraic properties. The symbol type determines whether operations involving this symbol are commutative.
Variants§
Scalar
Scalar variable (default) - commutative
Examples: x, y, z, theta Properties: xy = yx
Matrix
Matrix variable - noncommutative
Examples: A, B, M (typically uppercase) Properties: AB ≠ BA in general
Operator
Quantum operator - noncommutative
Examples: x, p, H (position, momentum, Hamiltonian)
Properties: [x,p] = xp - px ≠ 0
Quaternion
Quaternion - noncommutative
Examples: i, j, k Properties: ij = k, ji = -k
Trait Implementations§
Source§impl Clone for SymbolType
impl Clone for SymbolType
Source§fn clone(&self) -> SymbolType
fn clone(&self) -> SymbolType
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 SymbolType
impl Debug for SymbolType
Source§impl Default for SymbolType
impl Default for SymbolType
Source§fn default() -> SymbolType
fn default() -> SymbolType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SymbolType
impl<'de> Deserialize<'de> for SymbolType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SymbolType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SymbolType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SymbolType
impl Hash for SymbolType
Source§impl PartialEq for SymbolType
impl PartialEq for SymbolType
Source§impl Serialize for SymbolType
impl Serialize for SymbolType
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,
Serialize this value into the given Serde serializer. Read more
impl Copy for SymbolType
impl Eq for SymbolType
impl StructuralPartialEq for SymbolType
Auto Trait Implementations§
impl Freeze for SymbolType
impl RefUnwindSafe for SymbolType
impl Send for SymbolType
impl Sync for SymbolType
impl Unpin for SymbolType
impl UnwindSafe for SymbolType
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<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>
Converts
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>
Converts
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