pub trait GetValue<T> {
type ValueIn;
type ValueOut;
// Required methods
fn get_key(index: &T) -> Self;
fn get_transform(index: &T, value: Self::ValueIn) -> Self::ValueOut;
}Expand description
Trait for transforming value stored at index I when using index of different type T to read out value e.g. Hermitian Hamiltonian H but we access H[NOIndex(2,1)] -> H[HermitianIndex(1,2)].conj()
Required Associated Types§
Required Methods§
fn get_key(index: &T) -> Self
fn get_transform(index: &T, value: Self::ValueIn) -> Self::ValueOut
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl GetValue<(DecoherenceProduct, DecoherenceProduct)> for (DecoherenceProduct, DecoherenceProduct)
impl GetValue<(DecoherenceProduct, DecoherenceProduct)> for (DecoherenceProduct, DecoherenceProduct)
Source§fn get_key(index: &(DecoherenceProduct, DecoherenceProduct)) -> Self
fn get_key(index: &(DecoherenceProduct, DecoherenceProduct)) -> Self
Source§fn get_transform(
_index: &(DecoherenceProduct, DecoherenceProduct),
value: CalculatorComplex,
) -> CalculatorComplex
fn get_transform( _index: &(DecoherenceProduct, DecoherenceProduct), value: CalculatorComplex, ) -> CalculatorComplex
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Implementors§
Source§impl GetValue<BosonProduct> for BosonProduct
Trait for transforming value stored at index I when using index of different type T to read out value
impl GetValue<BosonProduct> for BosonProduct
Trait for transforming value stored at index I when using index of different type T to read out value
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Source§impl GetValue<BosonProduct> for HermitianBosonProduct
impl GetValue<BosonProduct> for HermitianBosonProduct
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Source§impl GetValue<HermitianBosonProduct> for BosonProduct
impl GetValue<HermitianBosonProduct> for BosonProduct
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Source§impl GetValue<HermitianBosonProduct> for HermitianBosonProduct
Trait for transforming value stored at index I when using index of different type T to read out value
impl GetValue<HermitianBosonProduct> for HermitianBosonProduct
Trait for transforming value stored at index I when using index of different type T to read out value
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Source§impl GetValue<FermionProduct> for FermionProduct
impl GetValue<FermionProduct> for FermionProduct
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Source§impl GetValue<FermionProduct> for HermitianFermionProduct
impl GetValue<FermionProduct> for HermitianFermionProduct
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Source§impl GetValue<HermitianFermionProduct> for FermionProduct
impl GetValue<HermitianFermionProduct> for FermionProduct
type ValueIn = CalculatorComplex
type ValueOut = CalculatorComplex
Source§impl GetValue<HermitianFermionProduct> for HermitianFermionProduct
Trait for transforming value stored at index I when using index of different type T to read out value
impl GetValue<HermitianFermionProduct> for HermitianFermionProduct
Trait for transforming value stored at index I when using index of different type T to read out value