C# Class SharpNeat.Phenomes.MappingSignalArray

MappingSignalArray wraps a native array along with an indirection/mapping array. The resulting MappingSignalArray provides indexed access to the underlying native array via a level of indirection/mapping. See SignalArray for more info.
Inheritance: ISignalArray
显示文件 Open project: colgreen/sharpneat Class Usage Examples

Public Methods

Method Description
CopyFrom ( double sourceArray, int targetIndex ) : void

Copies all elements from the source array writing them into the current MappingSignalArray starting at the specified targetIndex.

CopyFrom ( double sourceArray, int targetIndex, int length ) : void

Copies length elements from the source array writing them to the current MappingSignalArray starting at the specified targetIndex.

CopyFrom ( double sourceArray, int sourceIndex, int targetIndex, int length ) : void

Copies length elements starting from sourceIndex on sourceArray to the current MappingSignalArray starting at the specified targetIndex.

CopyTo ( double targetArray, int targetIndex ) : void

Copies all elements from the current MappingSignalArray to the specified target array starting at the specified target Array index.

CopyTo ( double targetArray, int targetIndex, int length ) : void

Copies length elements from the current MappingSignalArray to the specified target array starting at the specified target Array index.

CopyTo ( double targetArray, int targetIndex, int sourceIndex, int length ) : void

Copies length elements from the current MappingSignalArray to the specified target starting from targetIndex on the target array and sourceIndex on the current source SignalArray.

MappingSignalArray ( double wrappedArray, int map ) : System.Diagnostics

Construct a SignalArray that wraps the provided wrappedArray.

Reset ( ) : void

Reset all array elements to zero.

this ( int index ) : double

Gets or sets the single value at the specified index. We assert that the index is within the defined range of the signal array. Throwing an exception would be more correct but the check would affect performance of problem domains with large I/O throughput.

Private Methods

Method Description
ValidateMapIndexes ( ) : bool

Validate the indexes within _map. Returns true if they are all valid (within the indexable range of _wrappedArray)

Method Details

CopyFrom() public method

Copies all elements from the source array writing them into the current MappingSignalArray starting at the specified targetIndex.
public CopyFrom ( double sourceArray, int targetIndex ) : void
sourceArray double The array to copy elements from.
targetIndex int The index into the current SignalArray at which copying begins.
return void

CopyFrom() public method

Copies length elements from the source array writing them to the current MappingSignalArray starting at the specified targetIndex.
public CopyFrom ( double sourceArray, int targetIndex, int length ) : void
sourceArray double The array to copy elements from.
targetIndex int The index into the current SignalArray at which copying begins.
length int The number of elements to copy.
return void

CopyFrom() public method

Copies length elements starting from sourceIndex on sourceArray to the current MappingSignalArray starting at the specified targetIndex.
public CopyFrom ( double sourceArray, int sourceIndex, int targetIndex, int length ) : void
sourceArray double The array to copy elements from.
sourceIndex int The sourceArray index at which copying begins.
targetIndex int The index into the current SignalArray at which copying begins.
length int The number of elements to copy.
return void

CopyTo() public method

Copies all elements from the current MappingSignalArray to the specified target array starting at the specified target Array index.
public CopyTo ( double targetArray, int targetIndex ) : void
targetArray double The array to copy elements to.
targetIndex int The targetArray index at which copying to begins.
return void

CopyTo() public method

Copies length elements from the current MappingSignalArray to the specified target array starting at the specified target Array index.
public CopyTo ( double targetArray, int targetIndex, int length ) : void
targetArray double The array to copy elements to.
targetIndex int The targetArray index at which storing begins.
length int The number of elements to copy.
return void

CopyTo() public method

Copies length elements from the current MappingSignalArray to the specified target starting from targetIndex on the target array and sourceIndex on the current source SignalArray.
public CopyTo ( double targetArray, int targetIndex, int sourceIndex, int length ) : void
targetArray double The array to copy elements to.
targetIndex int The targetArray index at which copying begins.
sourceIndex int The index into the current SignalArray at which copying begins.
length int The number of elements to copy.
return void

MappingSignalArray() public method

Construct a SignalArray that wraps the provided wrappedArray.
public MappingSignalArray ( double wrappedArray, int map ) : System.Diagnostics
wrappedArray double
map int
return System.Diagnostics

Reset() public method

Reset all array elements to zero.
public Reset ( ) : void
return void

this() public method

Gets or sets the single value at the specified index. We assert that the index is within the defined range of the signal array. Throwing an exception would be more correct but the check would affect performance of problem domains with large I/O throughput.
public this ( int index ) : double
index int
return double