Click or drag to resize

FloatVectorItem(Slice) Property

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: 7.4
Syntax
public FloatVector this[
	Slice slice
] { get; set; }

Parameters

slice  Slice
 

Property Value

FloatVector

Implements

ISliceableTItemSlice
Remarks
Data is not copied. Both vectors reference the same data. Use with caution.
Example
The following example illustrates how a Slice views a subset of a vector's data:
C#
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