pub struct ComplexTensor {
pub shape: Vec<usize>,
pub rows: usize,
pub cols: usize,
/* private fields */
}Fields§
§shape: Vec<usize>§rows: usize§cols: usizeImplementations§
Source§impl ComplexTensor
impl ComplexTensor
pub fn new(data: Vec<(f64, f64)>, shape: Vec<usize>) -> Result<Self, String>
pub fn from_f32( data: Vec<(f32, f32)>, shape: Vec<usize>, ) -> Result<Self, String>
Sourcepub fn from_f64_values_with_dtype(
data: Vec<(f64, f64)>,
shape: Vec<usize>,
dtype: NumericDType,
) -> Result<Self, String>
pub fn from_f64_values_with_dtype( data: Vec<(f64, f64)>, shape: Vec<usize>, dtype: NumericDType, ) -> Result<Self, String>
Reconstructs floating complex values in the requested floating class.
pub fn from_complex_storage( storage: ComplexStorage, shape: Vec<usize>, ) -> Result<Self, String>
pub fn new_integer( storage: IntegerComplexStorage, shape: Vec<usize>, ) -> Result<Self, String>
pub fn new_2d( data: Vec<(f64, f64)>, rows: usize, cols: usize, ) -> Result<Self, String>
pub fn zeros(shape: Vec<usize>) -> Self
pub fn complex_storage(&self) -> &ComplexStorage
pub fn into_complex_storage(self) -> ComplexStorage
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn numeric_dtype(&self) -> NumericDType
pub fn as_f64_slice(&self) -> Option<&[(f64, f64)]>
pub fn as_f32_slice(&self) -> Option<&[(f32, f32)]>
Sourcepub fn materialize_f64(&self) -> Vec<(f64, f64)>
pub fn materialize_f64(&self) -> Vec<(f64, f64)>
Explicitly materializes complex values in the f64 computation domain.
Integer components outside the exact binary64 range may lose precision.
pub fn integer_storage(&self) -> Option<&IntegerComplexStorage>
Sourcepub fn numeric_value_at(
&self,
index: usize,
) -> Option<(NumericScalar, NumericScalar)>
pub fn numeric_value_at( &self, index: usize, ) -> Option<(NumericScalar, NumericScalar)>
Read one complex element without routing integer components through floating point.
Sourcepub fn set_f64_assignment_at(
&mut self,
index: usize,
real: f64,
imag: f64,
) -> Result<(), String>
pub fn set_f64_assignment_at( &mut self, index: usize, real: f64, imag: f64, ) -> Result<(), String>
Assigns one complex floating scalar using the destination component class.
Sourcepub fn format_element(&self, index: usize) -> String
pub fn format_element(&self, index: usize) -> String
Formats one element using its exact integer components when present.
Trait Implementations§
Source§impl Clone for ComplexTensor
impl Clone for ComplexTensor
Source§fn clone(&self) -> ComplexTensor
fn clone(&self) -> ComplexTensor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ComplexTensor
impl Debug for ComplexTensor
Source§impl Display for ComplexTensor
impl Display for ComplexTensor
Source§impl PartialEq for ComplexTensor
impl PartialEq for ComplexTensor
impl StructuralPartialEq for ComplexTensor
Auto Trait Implementations§
impl Freeze for ComplexTensor
impl RefUnwindSafe for ComplexTensor
impl Send for ComplexTensor
impl Sync for ComplexTensor
impl Unpin for ComplexTensor
impl UnsafeUnpin for ComplexTensor
impl UnwindSafe for ComplexTensor
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