Operations

A class that provides methods to apply mathematical Operations (like Integration, Summation, Multiplication, etc.) to dataset object(s). All operations throw an InvalidOperationException when an invalid dataset is passed in as an input. An invalid dataset could be null dataset reference, dataset with either of the x or y values list empty or dataset with a mismatch in the size of its x and y values list.

Declaration Syntax

public static class Operations

Table 77: Members

Method

Addition(Dataset2D, Dataset2D, params Dataset2D[])

Performs an addition operation on the y-values (at each x-value) of the input datasets and returns the result as a new dataset. A minimum of two datasets are expected as input. Extra datasets can be provided optionally. The resultant dataset contains the intersection of x-values from all the input datasets and the summation of the corresponding y-values. (There is no interpolation done for any missing y-values.) If all the input datasets are of the same Quantity type, internal unit conversions are done if needed, and the resultant dataset will also be of the same Quantity type. If any of the input datasets have different Quantity types, no unit conversions are attempted, and the resultant dataset will be Dimensionless. An ArgumentException is thrown if any of the datasets is invalid. An InvalidOperationException is thrown if there is no intersection between the x-values of the input datasets.

Method

Differentiation(Dataset2D)

Performs differentiation using the central difference method on a dataset and returns the result as a new dataset. The resultant dataset will be Dimensionless. (See documentation for more details) An ArgumentException is thrown if the input dataset is either invalid or is non-differentiable.

Method

Division(Dataset2D, Dataset2D)

Performs a division operation on the y-values of the dividend dataset by the divisor and returns the result as a new dataset. The resultant dataset contains the intersection of x-values from all the input datasets and the division of the corresponding y-values. (There is no interpolation done for any missing y-values.) If all the input datasets are of the same Quantity type, internal unit conversions are done if needed, but the resultant dataset will be Dimensionless. (See documentation for more details) If any of the input datasets have different Quantity types, no unit conversions are attempted, and the resultant dataset will be Dimensionless. An ArgumentException is thrown if either one of the datasets is invalid. An InvalidOperationException is thrown if there is no intersection between the x-values of the input datasets.

Method

Integration(Dataset2D)

Performs integration using the trapezoidal rule on a dataset and returns the result as a new dataset. The resultant dataset will be Dimensionless. (See documentation for more details) An ArgumentException is thrown if the input dataset is either invalid or contains less than two values.

Method

Multiplication(Dataset2D, Dataset2D, params Dataset2D[])

Performs a multiplication operation on the y-values (at each x-value) of the input datasets and returns the result as a new dataset. A minimum of two datasets are expected as input. Extra datasets can be provided optionally. The resultant dataset contains the intersection of x-values from all the input datasets and the multiplication of the corresponding y-values. (There is no interpolation done for any missing y-values.) If all the input datasets are of the same Quantity type, internal unit conversions are done if needed, but the resultant dataset will be Dimensionless. (See documentation for more details) If any of the input datasets have different Quantity types, no unit conversions are attempted, and the resultant dataset will be Dimensionless. An ArgumentException is thrown if either one of the datasets is invalid. An InvalidOperationException is thrown if there is no intersection between the x-values of the input datasets

Method

ScaleAxis(Dataset2D, double, double)

Scales the dataset values by a factor provided in the input for each axis. The new resultant dataset is returned as the output. The resultant dataset will maintain the same Quantity and units as the input dataset. An ArgumentException is thrown if the input dataset is invalid.

Method

ShiftAxis(Dataset2D, Quantity, Quantity)

Shifts the dataset values by a value provided in the input for each axis. The new resultant dataset is returned as the output. The resultant dataset will maintain the same Quantity and units as the input dataset. An ArgumentException is thrown if the input dataset is invalid.

Method

Subtraction(Dataset2D, Dataset2D)

Performs a subtraction operation on the y-values of the subtrahend from the minuend and returns the result as a new dataset. The resultant dataset contains the intersection of x-values from all the input datasets and the subtraction of the corresponding y-values. (There is no interpolation done for any missing y-values.) If all the input datasets are of the same Quantity type, internal unit conversions are done if needed, and the resultant dataset will also be of the same Quantity type. If any of the input datasets have different Quantity types, no unit conversions are attempted, and the resultant dataset will be Dimensionless. An ArgumentException is thrown if either one of the datasets is invalid. An InvalidOperationException is thrown if there is no intersection between the x-values of the input datasets.