Struct numeric::tensor::Tensor
[−]
[src]
pub struct Tensor<T> { /* fields omitted */ }
An implementation of an N-dimensional matrix. A quick example:
use numeric::Tensor; let t = Tensor::new(vec![1.0f64, 3.0, 2.0, 2.0]).reshape(&[2, 2]); println!("t = {}", t);
Will output:
t =
1 3
2 2
[Tensor<f64> of shape 2x2]
Methods
impl Tensor<f32>
[src]
fn dot(&self, rhs: &Tensor<f32>) -> Tensor<f32>
Takes the product of two tensors. If the tensors are both matrices (2D), then a matrix multiplication is taken. If the tensors are both vectors (1D), the scalar product is taken.
impl Tensor<f64>
[src]
fn dot(&self, rhs: &Tensor<f64>) -> Tensor<f64>
Takes the product of two tensors. If the tensors are both matrices (2D), then a matrix multiplication is taken. If the tensors are both vectors (1D), the scalar product is taken.
impl<T: TensorTrait + Add<Output = T>> Tensor<T>
[src]
fn add_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: TensorTrait + Sub<Output = T>> Tensor<T>
[src]
fn sub_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: TensorTrait + Mul<Output = T>> Tensor<T>
[src]
fn mul_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: TensorTrait + Div<Output = T>> Tensor<T>
[src]
fn div_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: TensorTrait + Rem<Output = T>> Tensor<T>
[src]
fn rem_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: TensorTrait + BitAnd<Output = T>> Tensor<T>
[src]
fn bitand_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: TensorTrait + BitOr<Output = T>> Tensor<T>
[src]
fn bitor_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: TensorTrait + BitXor<Output = T>> Tensor<T>
[src]
fn bitxor_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)
impl<T: NumericTrait> Tensor<T>
[src]
impl<T: TensorTrait + Add<Output = T>> Tensor<T>
[src]
impl<T: TensorTrait + Mul<Output = T>> Tensor<T>
[src]
impl<T: TensorTrait + BitAnd<Output = T>> Tensor<T>
[src]
fn bitand_axis(&self, axis: usize) -> Tensor<T>
impl<T: TensorTrait + BitOr<Output = T>> Tensor<T>
[src]
fn bitor_axis(&self, axis: usize) -> Tensor<T>
impl<T: TensorTrait + BitXor<Output = T>> Tensor<T>
[src]
fn bitxor_axis(&self, axis: usize) -> Tensor<T>
impl<T: TensorTrait> Tensor<T>
[src]
impl<T: NumericTrait> Tensor<T>
[src]
fn convert<D: NumericTrait>(&self) -> Tensor<D>
Returns a new tensor with the elements converted to the selected type.
use numeric::Tensor; let tdouble = tensor![1.0f64, 2.0, 3.0]; let tsingle = tdouble.convert::<f32>();
fn to_f32(&self) -> Tensor<f32>
Short-hand for convert::<f32>()
.
fn to_f64(&self) -> Tensor<f64>
Short-hand for convert::<f64>()
.
impl<T: TensorTrait + PartialOrd> Tensor<T>
[src]
Element-wise comparison.
impl<T: TensorTrait + PartialOrd> Tensor<T>
[src]
Element-wise comparison.
impl<T: TensorTrait + PartialOrd> Tensor<T>
[src]
Element-wise comparison.
impl<T: TensorTrait + PartialOrd> Tensor<T>
[src]
Element-wise comparison.
impl<T: TensorTrait + PartialOrd> Tensor<T>
[src]
Element-wise comparison.
impl<T: TensorTrait + PartialOrd> Tensor<T>
[src]
Element-wise comparison.
impl Tensor<bool>
[src]
impl<T: TensorTrait> Tensor<T>
[src]
unsafe fn as_ptr(&self) -> *const T
unsafe fn as_mut_ptr(&mut self) -> *mut T
fn new(data: Vec<T>) -> Tensor<T>
Creates a new tensor from a Vec
object. It will take ownership of the vector.
fn empty(shape: &[usize]) -> Tensor<T>
Creates a zero-filled tensor of the specified shape.
fn mem_slice(&self) -> &[T]
fn mem_slice_mut(&mut self) -> &mut [T]
fn slice(&self) -> &[T]
Returns a flat slice of the tensor. Only works for canonical tensors.
fn slice_mut(&mut self) -> &mut [T]
Returns a mutable flat slice of the tensor. Only works for canonical tensors. Will make a copy of the underyling data if the tensor is not unique.
fn iter(&self) -> TensorIterator<T>
fn scalar(value: T) -> Tensor<T>
Creates a Tensor representing a scalar
fn is_scalar(&self) -> bool
fn scalar_value(&self) -> T
fn filled(shape: &[usize], v: T) -> Tensor<T>
Creates a new tensor of a given shape filled with the specified value.
fn shape(&self) -> &Vec<usize>
Returns the shape of the tensor.
fn dim(&self, axis: usize) -> usize
Returns length of single dimension.
fn data(&self) -> &Vec<T>
Returns a reference of the underlying data vector.
fn flatten(&self) -> Tensor<T>
Flattens the tensor to one-dimensional.
fn canonize(&self) -> Tensor<T>
Make a dense copy of the tensor. This means it will have default strides and no memory offset.
fn canonize_inplace(&mut self)
fn size(&self) -> usize
Returns number of elements in the tensor.
fn ndim(&self) -> usize
Returns the number of axes. This is the same as the length of the shape array.
fn index(&self, selection: &[AxisIndex]) -> Tensor<T>
Takes slices (subsets) of tensors and returns a tensor as a new object. Uses the
AxisIndex
enum to specify indexing for each axis.
use numeric::{DoubleTensor, Ellipsis, StridedSlice, Index, Full}; let t = DoubleTensor::ones(&[2, 3, 4]); t.index(&[Ellipsis, StridedSlice(Some(1), Some(3), 1)]); // shape [2, 3, 2] t.index(&[Index(-1)]); // shape [3, 4] t.index(&[Full, StridedSlice(Some(1), None, 1), Index(1)]); // shape [2, 2]
fn base(&self) -> Tensor<T>
Returns the underlying memory as a vector.
fn index_set(&mut self, selection: &[AxisIndex], other: &Tensor<T>)
Similar to index
, except this updates the tensor with other
instead of returning them.
fn bool_index(&self, indices: &Tensor<bool>) -> Tensor<T>
fn bool_index_set(&mut self, indices: &Tensor<bool>, values: &Tensor<T>)
fn unravel_index(&self, index: usize) -> Vec<usize>
Takes a flatten index (if in row-major order) and returns a vector of the per-axis indices.
fn ravel_index(&self, ii: &[usize]) -> usize
Takes an array of per-axis indices and returns a flattened index (in row-major order).
fn reshape(self, shape: &[isize]) -> Tensor<T>
Reshapes the data. This moves the data, so no memory is allocated.
fn set(&mut self, other: &Tensor<T>)
Sets all the values according to another tensor.
fn swapaxes(&self, axis1: usize, axis2: usize) -> Tensor<T>
Swaps two axes.
fn transpose(&self) -> Tensor<T>
Transposes a matrix (for now, requires it to be 2D).
impl<T: Copy + Zero> Tensor<T>
[src]
impl<T: Copy + One> Tensor<T>
[src]
impl<T: Copy + Zero + One> Tensor<T>
[src]
fn eye(size: usize) -> Tensor<T>
Creates an identity 2-D tensor (matrix). That is, all elements are zero except the diagonal which is filled with ones.
impl<T: Copy + Add + Zero + One> Tensor<T>
[src]
fn range(size: usize) -> Tensor<T>
Creates a new vector with integer values starting at 0 and counting up:
use numeric::DoubleTensor; let t = DoubleTensor::range(5); // [ 0.00 1.00 2.00 3.00 4.00]
impl<T: TensorTrait + Num + NumCast> Tensor<T>
[src]
fn linspace(start: T, stop: T, num: usize) -> Tensor<T>
Creates a new vector between two values at constant increments. The number of elements is specified.
impl<T: NumericTrait> Tensor<T>
[src]
impl Tensor<f64>
[src]
fn solve(&self, b: &Tensor<f64>) -> Tensor<f64>
Solves the linear equation Ax = b
and returns x
. The matrix A
is self
and
must be a square matrix. The input b
must be a vector.
Panics if matrix is singular.
impl Tensor<f32>
[src]
fn solve(&self, b: &Tensor<f32>) -> Tensor<f32>
Solves the linear equation Ax = b
and returns x
. The matrix A
is self
and
must be a square matrix. The input b
must be a vector.
Panics if matrix is singular.
impl Tensor<f64>
[src]
fn svd(&self, full_matrices: bool) -> (Tensor<f64>, Tensor<f64>, Tensor<f64>)
Performs a singular value decomposition on the matrix.
impl Tensor<f32>
[src]
fn svd(&self, full_matrices: bool) -> (Tensor<f32>, Tensor<f32>, Tensor<f32>)
Performs a singular value decomposition on the matrix.
impl Tensor<u8>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<u16>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<u32>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<u64>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<i8>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<i16>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<i32>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<i64>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<f32>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
impl Tensor<f64>
[src]
fn save_hdf5(&self, path: &Path) -> Result<()>
Saves tensor to an HDF5 file.
Warning: This function is not thread-safe (unless you compiled HDF5 to be thread-safe). Do no call this function concurrently from multiple threads.
Trait Implementations
impl Display for Tensor<f32>
[src]
impl Display for Tensor<f64>
[src]
impl Display for Tensor<usize>
[src]
impl Display for Tensor<u8>
[src]
impl Display for Tensor<u16>
[src]
impl Display for Tensor<u32>
[src]
impl Display for Tensor<u64>
[src]
impl Display for Tensor<isize>
[src]
impl Display for Tensor<i8>
[src]
impl Display for Tensor<i16>
[src]
impl Display for Tensor<i32>
[src]
impl Display for Tensor<i64>
[src]
impl Display for Tensor<bool>
[src]
impl Display for Tensor<Complex32>
[src]
impl Display for Tensor<Complex64>
[src]
impl<T: TensorTrait + Add<Output = T>> Add for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the +
operator
fn add(self, rhs: Self::Output) -> Self::Output
The method for the +
operator
impl<'a, T: TensorTrait + Add<Output = T>> Add<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the +
operator
fn add(self, rhs: &Self::Output) -> Self::Output
The method for the +
operator
impl<'a, T: TensorTrait + Add<Output = T>> Add<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the +
operator
fn add(self, rhs: &Self::Output) -> Self::Output
The method for the +
operator
impl<T: TensorTrait + Add<Output = T>> Add<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the +
operator
fn add(self, rhs: T) -> Self::Output
The method for the +
operator
impl<'a, T: TensorTrait + Add<Output = T>> Add<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the +
operator
fn add(self, rhs: T) -> Self::Output
The method for the +
operator
impl<T: TensorTrait + Sub<Output = T>> Sub for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the -
operator
fn sub(self, rhs: Self::Output) -> Self::Output
The method for the -
operator
impl<'a, T: TensorTrait + Sub<Output = T>> Sub<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the -
operator
fn sub(self, rhs: &Self::Output) -> Self::Output
The method for the -
operator
impl<'a, T: TensorTrait + Sub<Output = T>> Sub<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the -
operator
fn sub(self, rhs: &Self::Output) -> Self::Output
The method for the -
operator
impl<T: TensorTrait + Sub<Output = T>> Sub<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the -
operator
fn sub(self, rhs: T) -> Self::Output
The method for the -
operator
impl<'a, T: TensorTrait + Sub<Output = T>> Sub<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the -
operator
fn sub(self, rhs: T) -> Self::Output
The method for the -
operator
impl<T: TensorTrait + Mul<Output = T>> Mul for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Self::Output) -> Self::Output
The method for the *
operator
impl<'a, T: TensorTrait + Mul<Output = T>> Mul<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the *
operator
fn mul(self, rhs: &Self::Output) -> Self::Output
The method for the *
operator
impl<'a, T: TensorTrait + Mul<Output = T>> Mul<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the *
operator
fn mul(self, rhs: &Self::Output) -> Self::Output
The method for the *
operator
impl<T: TensorTrait + Mul<Output = T>> Mul<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Self::Output
The method for the *
operator
impl<'a, T: TensorTrait + Mul<Output = T>> Mul<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Self::Output
The method for the *
operator
impl<T: TensorTrait + Div<Output = T>> Div for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the /
operator
fn div(self, rhs: Self::Output) -> Self::Output
The method for the /
operator
impl<'a, T: TensorTrait + Div<Output = T>> Div<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the /
operator
fn div(self, rhs: &Self::Output) -> Self::Output
The method for the /
operator
impl<'a, T: TensorTrait + Div<Output = T>> Div<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the /
operator
fn div(self, rhs: &Self::Output) -> Self::Output
The method for the /
operator
impl<T: TensorTrait + Div<Output = T>> Div<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Self::Output
The method for the /
operator
impl<'a, T: TensorTrait + Div<Output = T>> Div<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Self::Output
The method for the /
operator
impl<T: TensorTrait + Rem<Output = T>> Rem for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the %
operator
fn rem(self, rhs: Self::Output) -> Self::Output
The method for the %
operator
impl<'a, T: TensorTrait + Rem<Output = T>> Rem<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the %
operator
fn rem(self, rhs: &Self::Output) -> Self::Output
The method for the %
operator
impl<'a, T: TensorTrait + Rem<Output = T>> Rem<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the %
operator
fn rem(self, rhs: &Self::Output) -> Self::Output
The method for the %
operator
impl<T: TensorTrait + Rem<Output = T>> Rem<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the %
operator
fn rem(self, rhs: T) -> Self::Output
The method for the %
operator
impl<'a, T: TensorTrait + Rem<Output = T>> Rem<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the %
operator
fn rem(self, rhs: T) -> Self::Output
The method for the %
operator
impl<T: TensorTrait + BitAnd<Output = T>> BitAnd for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the &
operator
fn bitand(self, rhs: Self::Output) -> Self::Output
The method for the &
operator
impl<'a, T: TensorTrait + BitAnd<Output = T>> BitAnd<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the &
operator
fn bitand(self, rhs: &Self::Output) -> Self::Output
The method for the &
operator
impl<'a, T: TensorTrait + BitAnd<Output = T>> BitAnd<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the &
operator
fn bitand(self, rhs: &Self::Output) -> Self::Output
The method for the &
operator
impl<T: TensorTrait + BitAnd<Output = T>> BitAnd<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the &
operator
fn bitand(self, rhs: T) -> Self::Output
The method for the &
operator
impl<'a, T: TensorTrait + BitAnd<Output = T>> BitAnd<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the &
operator
fn bitand(self, rhs: T) -> Self::Output
The method for the &
operator
impl<T: TensorTrait + BitOr<Output = T>> BitOr for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the |
operator
fn bitor(self, rhs: Self::Output) -> Self::Output
The method for the |
operator
impl<'a, T: TensorTrait + BitOr<Output = T>> BitOr<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the |
operator
fn bitor(self, rhs: &Self::Output) -> Self::Output
The method for the |
operator
impl<'a, T: TensorTrait + BitOr<Output = T>> BitOr<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the |
operator
fn bitor(self, rhs: &Self::Output) -> Self::Output
The method for the |
operator
impl<T: TensorTrait + BitOr<Output = T>> BitOr<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the |
operator
fn bitor(self, rhs: T) -> Self::Output
The method for the |
operator
impl<'a, T: TensorTrait + BitOr<Output = T>> BitOr<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the |
operator
fn bitor(self, rhs: T) -> Self::Output
The method for the |
operator
impl<T: TensorTrait + BitXor<Output = T>> BitXor for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the ^
operator
fn bitxor(self, rhs: Self::Output) -> Self::Output
The method for the ^
operator
impl<'a, T: TensorTrait + BitXor<Output = T>> BitXor<&'a Tensor<T>> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the ^
operator
fn bitxor(self, rhs: &Self::Output) -> Self::Output
The method for the ^
operator
impl<'a, T: TensorTrait + BitXor<Output = T>> BitXor<&'a Tensor<T>> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the ^
operator
fn bitxor(self, rhs: &Self::Output) -> Self::Output
The method for the ^
operator
impl<T: TensorTrait + BitXor<Output = T>> BitXor<T> for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the ^
operator
fn bitxor(self, rhs: T) -> Self::Output
The method for the ^
operator
impl<'a, T: TensorTrait + BitXor<Output = T>> BitXor<T> for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the ^
operator
fn bitxor(self, rhs: T) -> Self::Output
The method for the ^
operator
impl<T: TensorTrait + Neg<Output = T>> Neg for Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the -
operator
fn neg(self) -> Self::Output
The method for the unary -
operator
impl<'a, T: TensorTrait + Neg<Output = T>> Neg for &'a Tensor<T>
[src]
type Output = Tensor<T>
The resulting type after applying the -
operator
fn neg(self) -> Self::Output
The method for the unary -
operator
impl<T: TensorTrait + PartialOrd> PartialEq<Tensor<T>> for Tensor<T>
[src]
fn eq(&self, rhs: &Tensor<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<T: TensorTrait + PartialOrd> Eq for Tensor<T>
[src]
impl<'b, T: TensorTrait> Index<&'b [usize]> for Tensor<T>
[src]
type Output = T
The returned type after indexing
fn index<'a>(&'a self, ii: &'b [usize]) -> &'a T
The method for the indexing (container[index]
) operation
impl<'b, T: Copy> IndexMut<&'b [usize]> for Tensor<T>
[src]
fn index_mut<'a>(&'a mut self, ii: &'b [usize]) -> &'a mut T
The method for the mutable indexing (container[index]
) operation
impl<'b, T: Copy> Index<&'b Vec<usize>> for Tensor<T>
[src]
type Output = T
The returned type after indexing
fn index<'a>(&'a self, ii: &'b Vec<usize>) -> &'a T
The method for the indexing (container[index]
) operation
impl<'b, T: TensorTrait> IndexMut<&'b Vec<usize>> for Tensor<T>
[src]
fn index_mut<'a>(&'a mut self, ii: &'b Vec<usize>) -> &'a mut T
The method for the mutable indexing (container[index]
) operation
impl<T: TensorTrait> Index<(usize,)> for Tensor<T>
[src]
type Output = T
The returned type after indexing
fn index<'a>(&'a self, _index: (usize,)) -> &'a T
The method for the indexing (container[index]
) operation
impl<T: TensorTrait> IndexMut<(usize,)> for Tensor<T>
[src]
fn index_mut<'a>(&'a mut self, _index: (usize,)) -> &'a mut T
The method for the mutable indexing (container[index]
) operation
impl<T: TensorTrait> Index<(usize, usize)> for Tensor<T>
[src]
type Output = T
The returned type after indexing
fn index<'a>(&'a self, _index: (usize, usize)) -> &'a T
The method for the indexing (container[index]
) operation
impl<T: TensorTrait> IndexMut<(usize, usize)> for Tensor<T>
[src]
fn index_mut<'a>(&'a mut self, _index: (usize, usize)) -> &'a mut T
The method for the mutable indexing (container[index]
) operation
impl<T: TensorTrait> Index<(usize, usize, usize)> for Tensor<T>
[src]
type Output = T
The returned type after indexing
fn index<'a>(&'a self, _index: (usize, usize, usize)) -> &'a T
The method for the indexing (container[index]
) operation
impl<T: TensorTrait> IndexMut<(usize, usize, usize)> for Tensor<T>
[src]
fn index_mut<'a>(&'a mut self, _index: (usize, usize, usize)) -> &'a mut T
The method for the mutable indexing (container[index]
) operation
impl<T: TensorTrait> Clone for Tensor<T>
[src]
fn clone(&self) -> Tensor<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more