Click or drag to resize

DoubleVectorItem(Slice) Property

Returns a new DoubleVector 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 DoubleVector this[
	Slice slice
] { get; set; }

Parameters

slice  Slice
 

Property Value

DoubleVector

Implements

ISliceableTItemSlice
Remarks
Data is not copied with get. 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#
DoubleVector v1 = new DoubleVector( "0 1 2 3 4 5 6 7 8 9 10 11" );
Slice s = new Slice( 4, 3, 2 );
DoubleVector v2 = v1[s];
System.Console.WriteLine( v2.ToString() );

Output...
3 5 7
See Also