Axes Structure

Represents a collection of zero or more axes in a tensor.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0
C#
public readonly struct Axes : IEnumerable<int>, 
	IEnumerable
Inheritance
Object  →  ValueType  →  Axes
Implements
IEnumerable<Int32>, IEnumerable

Remarks

Use the Axes struct to represent a collection of dimensions in a tensor. In most cases, Axes values can be created using an implicit conversion. For a single axis, use an integer. For 2 or more axes, use a tuple of integers.

Negative values for axes are allowed. This indicates that the axis should be counted from the end.

Some methods require that the axes collection be normalized so that all axes have specific positive values. The Normalize(Int32) method turns any collection into a normalized collection.

Axes values are immutable. There can be a maximum of 31 axes.

Properties

Count Gets the number of axes in the collection.
IsNormalized Gets whether the axis collection contains only axes counted from 0.

Methods

AllOfRank Gets a collection of all axes that are present in a tensor of the specified rank.
Complement Gets the axis collection of all available axes that are not contained in the axis collection.
Contains Gets whether the axis collection contains the specified axis.
EqualsDetermines whether the specified object is equal to the current object.
(Overrides ValueType.Equals(Object))
GetEnumeratorReturns an enumerator that iterates through the collection.
GetHashCodeServes as the default hash function.
(Overrides ValueType.GetHashCode())
GetTypeGets the Type of the current instance.
(Inherited from Object)
Normalize Gets the collection of axes in the current collection that are present in a tensor of the specified rank.
ToStringReturns a string that represents the current object.
(Overrides ValueType.ToString())

Operators

Equality(Axes, Axes) Compares two axis collections for equality.
Implicit(Index to Axes) Implicitly converts an integer to an axis collection.
Implicit(Int32 to Axes) Implicitly converts an integer to an axis collection.
Implicit(ValueTuple<Int32, Int32> to Axes) Implicitly converts a pair of integers to an axis collection.
Implicit(ValueTuple<Int32, Int32, Int32> to Axes) Implicitly converts a triplet of integers to an axis collection.
Implicit(ValueTuple<Int32, Int32, Int32, Int32> to Axes) Implicitly converts a quartet of integers to an axis collection.
Implicit(ValueTuple<Int32, Int32, Int32, Int32, Int32> to Axes) Implicitly converts a quintuplet of integers to an axis collection.
Implicit(ValueTuple<Int32, Int32, Int32, Int32, Int32, Int32> to Axes) Implicitly converts a sextuplet of integers to an axis collection.
Inequality(Axes, Axes) Compares two axis collections for inequality.
Subtraction(Axes, Int32) Returns a new axis collection that has the specified axis removed.

Fields

All Gets an axes collection that contains all available axes.
Empty Gets an empty collection of axes.

Extension Methods

Group<Int32> Returns a grouping by the unique elements in a sequence.
(Defined by Grouping)
Group<Int32> Returns a grouping by the unique elements in a sequence using the specified comparer to determine equality.
(Defined by Grouping)
StandardDeviation<Int32> Returns the standard deviation of the elements of a sequence.
(Defined by Stats)
Sum<Int32> Computes the sum of the sequence of values.
(Defined by ArrayMath)
Sum<Int32, U> Computes the sum of the sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by ArrayMath)

See Also