Crate ndtensor

Source
Expand description

§ndtensor

Welcome to the ndtensor crate, a powerful N-dimensional tensor library for Rust.

§Features

The crate supports various extensions or integrations that enhance its functionality. These features can be enabled in your Cargo.toml file by specifying them under the features section. Here are some of the available features:

  • anyhow: Enables the use of the anyhow crate for error handling.
  • approx: Enables approximate equality checks for floating-point numbers.
  • complex: Enables complex number support.
  • json: Enables JSON serialization and deserialization capabilities.
  • rand: Enables random number generation capabilities.
  • serde: Enables serialization and deserialization capabilities.
  • tracing: Enables tracing capabilities for debugging and logging.

Modules§

error
this module defines the TensorError enum for handling tensor-related errors This module implements the core TensorError type for the framework and provides a [Result] type alias for convenience.
iter
this module defines various iterators for the TensorBase

Structs§

TensorBase
the TensorBase struct is the base type for all tensors in the library.

Enums§

TensorError
The [Error] type enumerates various errors that can occur within the framework.

Traits§

Affine
apply an affine transformation to a tensor; affine transformation is defined as mul * self + add
Inverse
The Inverse trait generically establishes an interface for computing the inverse of a type, regardless of if its a tensor, scalar, or some other compatible type.
MatMul
The MatMul trait defines an interface for matrix multiplication.
MatPow
The MatPow trait defines an interface for computing the exponentiation of a matrix.
NdTensor
The [Tensor] trait extends the RawTensor trait to provide additional functionality for tensors, such as creating tensors from shapes, applying functions, and iterating over elements. It is generic over the element type A and the dimension type `D
Numerical
Numerical is a trait for all numerical types; implements a number of core operations
RawTensor
The RawTensor trait defines the base interface for all tensors,
Scalar
The Scalar trait extends the Numerical trait to include additional mathematical operations for the purpose of reducing the number of overall traits required to complete various machine-learning tasks.
ScalarComplex
Transpose
The Transpose trait generically establishes an interface for transposing a type

Type Aliases§

ArcTensor
a type alias for a TensorBase setup to use a shared, thread-safe internal representation of the data.
CowTensor
a type alias for a TensorBase using a borrowed layout
RawViewMutTensor
a type alias for a TensorBase with an owned representation
RawViewTensor
A type alias for a TensorBase with a raw pointer representation.
Tensor
a type alias for a TensorBase with an owned representation
TensorView
a type alias for a TensorBase with a view representation
TensorViewMut
a type alias for a TensorBase with a mutable view representation