Struct numeric::tensor::Tensor [] [src]

pub struct Tensor<T> {
    // some 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: Copy + Add<Output=T>> Tensor<T>
[src]

fn add_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Copy + Sub<Output=T>> Tensor<T>
[src]

fn sub_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Copy + Mul<Output=T>> Tensor<T>
[src]

fn mul_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Copy + Div<Output=T>> Tensor<T>
[src]

fn div_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Copy + Rem<Output=T>> Tensor<T>
[src]

fn rem_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Copy + BitAnd<Output=T>> Tensor<T>
[src]

fn bitand_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Copy + BitOr<Output=T>> Tensor<T>
[src]

fn bitor_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Copy + BitXor<Output=T>> Tensor<T>
[src]

fn bitxor_with_out(&self, rhs: &Tensor<T>, out: &mut Tensor<T>)

impl<T: Numeric> Tensor<T>
[src]

fn max(&self) -> T

fn min(&self) -> T

fn sum(&self) -> T

fn mean(&self) -> T

impl<T: TensorType + Add<Output=T>> Tensor<T>
[src]

fn sum_axis(&self, axis: usize) -> Tensor<T>

impl<T: TensorType + Mul<Output=T>> Tensor<T>
[src]

fn prod_axis(&self, axis: usize) -> Tensor<T>

impl<T: TensorType + BitAnd<Output=T>> Tensor<T>
[src]

fn bitand_axis(&self, axis: usize) -> Tensor<T>

impl<T: TensorType + BitOr<Output=T>> Tensor<T>
[src]

fn bitor_axis(&self, axis: usize) -> Tensor<T>

impl<T: TensorType + BitXor<Output=T>> Tensor<T>
[src]

fn bitxor_axis(&self, axis: usize) -> Tensor<T>

impl<T: TensorType> Tensor<T>
[src]

fn concat(lhs: &Tensor<T>, rhs: &Tensor<T>, axis: usize) -> Tensor<T>

impl<T: Numeric> Tensor<T>
[src]

fn convert<D: Numeric>(&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: TensorType + PartialOrd> Tensor<T>
[src]

Element-wise comparison.

fn elem_gt(&self, rhs: &Tensor<T>) -> Tensor<bool>

impl<T: TensorType + PartialOrd> Tensor<T>
[src]

Element-wise comparison.

fn elem_ge(&self, rhs: &Tensor<T>) -> Tensor<bool>

impl<T: TensorType + PartialOrd> Tensor<T>
[src]

Element-wise comparison.

fn elem_lt(&self, rhs: &Tensor<T>) -> Tensor<bool>

impl<T: TensorType + PartialOrd> Tensor<T>
[src]

Element-wise comparison.

fn elem_le(&self, rhs: &Tensor<T>) -> Tensor<bool>

impl<T: TensorType + PartialOrd> Tensor<T>
[src]

Element-wise comparison.

fn elem_eq(&self, rhs: &Tensor<T>) -> Tensor<bool>

impl<T: TensorType + PartialOrd> Tensor<T>
[src]

Element-wise comparison.

fn elem_ne(&self, rhs: &Tensor<T>) -> Tensor<bool>

impl Tensor<bool>
[src]

fn all(&self) -> bool

fn any(&self) -> bool

impl<T: TensorType> 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 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 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 allocate.

fn set(&mut self, other: &Tensor<T>)

Sets all the values according to another tensor.

impl<T: TensorType + Num + NumCast> Tensor<T>
[src]

fn zeros(shape: &[usize]) -> Tensor<T>

Creates a zero-filled tensor of the specified shape.

fn ones(shape: &[usize]) -> Tensor<T>

Creates a one-filled tensor of the specified shape.

fn eye(size: usize) -> Tensor<T>

Creates an identify 2-D tensor (matrix). That is, all elements are zero except the diagonal which is filled with ones.

fn swapaxes(&self, axis1: usize, axis2: usize) -> Tensor<T>

Swaps two axes. This returns a new Tensor, since the memory needs to be re-arranged.

fn transpose(&self) -> Tensor<T>

Transposes a matrix (for now, requires it to be 2D).

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]

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: Numeric> Tensor<T>
[src]

fn fscalar(value: f64) -> Tensor<T>

Creates a scalar specified as a f64 and internally casted to T

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<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]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<f64>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<usize>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<u8>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<u16>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<u32>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<u64>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<isize>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<i8>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<i16>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<i32>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<i64>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Tensor<bool>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: Copy + 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: Copy + 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<T: Copy + 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: Copy + 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: TensorType + 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: TensorType + PartialOrd> Eq for Tensor<T>
[src]

impl<'b, T: TensorType> 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 (Foo[Bar]) operation

impl<'b, T: TensorType> IndexMut<&'b [usize]> for Tensor<T>
[src]

fn index_mut<'a>(&'a mut self, ii: &'b [usize]) -> &'a mut T

The method for the indexing (Foo[Bar]) operation

impl<'b, T: TensorType> 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 (Foo[Bar]) operation

impl<'b, T: TensorType> 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 indexing (Foo[Bar]) operation

impl<T: TensorType> 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 (Foo[Bar]) operation

impl<T: TensorType> IndexMut<(usize,)> for Tensor<T>
[src]

fn index_mut<'a>(&'a mut self, _index: (usize,)) -> &'a mut T

The method for the indexing (Foo[Bar]) operation

impl<T: TensorType> 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 (Foo[Bar]) operation

impl<T: TensorType> IndexMut<(usize, usize)> for Tensor<T>
[src]

fn index_mut<'a>(&'a mut self, _index: (usize, usize)) -> &'a mut T

The method for the indexing (Foo[Bar]) operation

impl<T: TensorType> 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 (Foo[Bar]) operation

impl<T: TensorType> 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 indexing (Foo[Bar]) operation

impl<T: Copy> 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