Returns a new FloatVector instance pointing to the subset of this vector's data indicated by the given Slice.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public FloatVector this[
	Slice slice
] { get; set; }
Visual Basic (Declaration)
Public Default Property Item ( _
	slice As Slice _
) As FloatVector
Visual C++
public:
virtual property FloatVector^ default[Slice^ slice] {
	FloatVector^ get (Slice^ slice) sealed;
	void set (Slice^ slice, FloatVector^ value) sealed;
}

Implements

ISliceable<(Of <(T>)>)..::.Item[([(Slice])])

Remarks

Data is not copied. Both vectors reference the same data. Use with caution.

Examples

The following example illustrates how a Slice views a subset of a vector's data:
CopyC#
FloatVector v1 = new FloatVector( "0 1 2 3 4 5 6 7 8 9 10 11" );
Slice s = new Slice( 4, 3, 2 );
FloatVector v2 = v1[s];
System.Console.WriteLine( v2.ToString() );

Output...
3 5 7

See Also