pub trait Composition<D: DualNum<f64> + Copy, N: Dim>where
DefaultAllocator: Allocator<N>,{
// Required method
fn into_molefracs<E: Residual<N, D>>(
self,
eos: &E,
) -> FeosResult<(OVector<D, N>, Option<Moles<D>>)>;
}Expand description
Trait to generalize over different input types for the composition of a state.
The trait is implemented for the following data types:
| components | input | total_moles? | comment |
|---|---|---|---|
| 1 | () | - | |
| 1 | Moles | ✅ | |
| 2 | f64 | - | |
| N | OVector<f64,N> | - | |
| N | &OVector<f64,N> | - | |
| N | OVector<f64,N-1> | - | Dyn only |
| N | &OVector<f64,N-1> | - | Dyn only |
| N | Moles<OVector<f64,N>> | ✅ | |
| N | &Moles<OVector<f64,N>> | ✅ |
Required Methods§
Sourcefn into_molefracs<E: Residual<N, D>>(
self,
eos: &E,
) -> FeosResult<(OVector<D, N>, Option<Moles<D>>)>
fn into_molefracs<E: Residual<N, D>>( self, eos: &E, ) -> FeosResult<(OVector<D, N>, Option<Moles<D>>)>
Convert the composition into molefracs and total moles if possible.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".