|  | Slice Class | 
            Class Slice represents a collection of indices that can be used to view
            a subset of data from another data structure. A slice is defined by a starting
            index, a total number of elements, and a step increment called the stride.
            
 Inheritance Hierarchy
Inheritance Hierarchy NMath (in NMath.dll) Version: 7.4
 Syntax
Syntax[SerializableAttribute]
public class Slice : ICloneable
<SerializableAttribute>
Public Class Slice
	Implements ICloneable
[SerializableAttribute]
public ref class Slice : ICloneable
[<SerializableAttribute>]
type Slice = 
    class
        interface ICloneable
    endThe Slice type exposes the following members.
 Constructors
Constructors|  | Name | Description | 
|---|
|  | Slice | Default constructor. | 
|  | Slice(Int32, Int32) | Constructs a Slice instance with the specified starting index, total number of
            elements, and default stride of 1. | 
|  | Slice(Int32, Int32, Int32) | Constructs a Slice instance with the specified starting index, total number of
            elements, and stride. | 
Top Properties
Properties|  | Name | Description | 
|---|
|   | All | Gets a new Slice indexing all. | 
|  | End | Gets the end data element. | 
|  | NumElements | Gets the total number of data elements. | 
|  | Start | Gets the starting data element. | 
|  | Stride | Gets the step increment between successive data elements. | 
Top Methods
Methods|  | Name | Description | 
|---|
|  | Begin | Calculates the starting element of this slice. | 
|  | Clone | Creates a deep copy of this slice. | 
|  | Length | Calculates the length of this slice. | 
|  | Set(Int32, Position, Int32) | Sets the specified starting index, a Position value indicating the end of the data, and
            a specified stride. | 
|  | Set(Int32, Int32, Int32) | Sets the the specified starting index, total number of elements, and stride
            for this slice. | 
|  | Set(Position, Position, Int32) | Sets the specified start and end positions and a stride. | 
|  | Set(Position, Int32, Int32) | Sets the specified position from which to start, the end index and a stride. | 
Top Fields
Fields|  | Name | Description | 
|---|
|   | DEFAULT_STRIDE | The default stride is 1. | 
|  | end_ | The end of the data. | 
|  | numElements_ | The total number of data elements. | 
|  | start_ | The start of the data. | 
|  | stride_ | The step increment between successive elements in the data. | 
Top Example
Example
            For example, a slice could be the third column of a matrix or the first ten elements
            of a vector.
            
 See Also
See Also