pub struct DummyTensor {
pub name: String,
pub shape: Vec<usize>,
pub data: Vec<f64>,
}Expand description
Minimal tensor implementation for testing and prototyping.
This is NOT meant for production use - it’s a placeholder for validating logic compilation and execution flow.
Fields§
§name: String§shape: Vec<usize>§data: Vec<f64>Implementations§
Source§impl DummyTensor
impl DummyTensor
pub fn new(name: impl Into<String>, shape: Vec<usize>) -> Self
pub fn with_data( name: impl Into<String>, shape: Vec<usize>, data: Vec<f64>, ) -> Self
pub fn size(&self) -> usize
pub fn zeros(name: impl Into<String>, shape: Vec<usize>) -> Self
pub fn ones(name: impl Into<String>, shape: Vec<usize>) -> Self
Trait Implementations§
Source§impl Clone for DummyTensor
impl Clone for DummyTensor
Source§fn clone(&self) -> DummyTensor
fn clone(&self) -> DummyTensor
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 moreAuto Trait Implementations§
impl Freeze for DummyTensor
impl RefUnwindSafe for DummyTensor
impl Send for DummyTensor
impl Sync for DummyTensor
impl Unpin for DummyTensor
impl UnsafeUnpin for DummyTensor
impl UnwindSafe for DummyTensor
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