-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Math.Classes
Class to perform Bilinear Interpolation on a set of data.
public class BilinearInterpolation : DiGi.Core.Classes.SerializableObject, DiGi.Math.Interfaces.IInterpolation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → BilinearInterpolation
Implements IInterpolation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Default constructor. Initializes a new instance of the BilinearInterpolation class.
public BilinearInterpolation();Copy constructor. Initializes a new instance of the BilinearInterpolation class by copying an existing instance.
public BilinearInterpolation(DiGi.Math.Classes.BilinearInterpolation? bilinearInterpolation);bilinearInterpolation BilinearInterpolation
The instance to copy.
Initializes a new instance of the BilinearInterpolation class using a 2D data array.
public BilinearInterpolation(double[,]? data);data System.Double[]
The 2D data array.
Initializes a new instance of the BilinearInterpolation class using a System.Text.Json.Nodes.JsonObject.
public BilinearInterpolation(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing the data to be deserialized into this instance.
The data matrix for interpolation, in [y, x] format.
private double[,]? values;Array of row (horizontal) values.
private readonly double[]? xArray;Array of column (vertical) values.
private readonly double[]? yArray;Calculate value
public double Calculate(double x, double y);Column value (Horizontal value)
Row value (Vertical value)
Populates the object's properties from a JsonObject.
public override bool FromJsonObject(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject containing the data to populate the object.
Implements FromJsonObject(JsonObject)
System.Boolean
True if the object was successfully populated; otherwise, false.
Converts the object into a JsonObject for serialization.
public override System.Text.Json.Nodes.JsonObject? ToJsonObject();Implements ToJsonObject()
System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the object, or null if conversion fails.
Equation in format y = Ax + B
public class LinearEquation : DiGi.Core.Classes.SerializableObject, DiGi.Math.Interfaces.IEquation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → LinearEquation
Implements IEquation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the LinearEquation class by copying an existing LinearEquation instance.
public LinearEquation(DiGi.Math.Classes.LinearEquation linearEquation);linearEquation LinearEquation
The source equation to copy from.
Initializes a new instance of the LinearEquation class with specified coefficients A and B.
public LinearEquation(double a, double b);The coefficient A (slope) of the linear equation.
The coefficient B (y-intercept) of the linear equation.
Initializes a new instance of the LinearEquation class using a System.Text.Json.Nodes.JsonObject.
public LinearEquation(System.Text.Json.Nodes.JsonObject jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing the equation data.
Coefficient A in the equation
public double A { get; }Coefficient B in the equation
public double B { get; }Gets the coefficients of the equation
public System.Collections.Generic.List<double> Coefficients { get; }System.Collections.Generic.List<System.Double>
Evaluates the equation for a given value of x
public double Evaluate(double value);value System.Double
The value of x
Implements Evaluate(double)
System.Double
The value of y for the given value of x
Evaluates the equation for a collection of values of x
public System.Collections.Generic.List<double>? Evaluate(System.Collections.Generic.IEnumerable<double>? values);values System.Collections.Generic.IEnumerable<System.Double>
The collection of values of x
Implements Evaluate(IEnumerable<double>)
System.Collections.Generic.List<System.Double>
A list of corresponding values of y
Linear Interpolation of given vlues
public class LinearInterpolation : DiGi.Core.Classes.SerializableObject, DiGi.Math.Interfaces.IInterpolation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → LinearInterpolation
Implements IInterpolation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the LinearInterpolation class.
public LinearInterpolation();Initializes a new instance of the LinearInterpolation class by copying values from an existing interpolation object.
public LinearInterpolation(DiGi.Math.Classes.LinearInterpolation? linearInterpolation);linearInterpolation LinearInterpolation
The source LinearInterpolation instance to copy.
Initializes a new instance of the LinearInterpolation class with two initial data points.
public LinearInterpolation(double x_1, double y_1, double x_2, double y_2);x_1 System.Double
The X coordinate of the first point.
y_1 System.Double
The Y coordinate of the first point.
x_2 System.Double
The X coordinate of the second point.
y_2 System.Double
The Y coordinate of the second point.
Initializes a new instance of the LinearInterpolation class using a 2D array where the first dimension represents axes (0 for X, 1 for Y) and the second dimension represents points.
public LinearInterpolation(double[,]? data);data System.Double[]
A 2D array containing coordinate pairs.
Initializes a new instance of the LinearInterpolation class using a System.Text.Json.Nodes.JsonObject for deserialization.
public LinearInterpolation(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing the interpolation data.
Gets the number of data points stored in the interpolation set. Returns -1 if the values collection is not initialized.
public int Count { get; }Gets the maximum X value among all stored data points. Returns System.Double.NaN if no values are present.
public double MaxX { get; }Gets the minimum X value among all stored data points. Returns System.Double.NaN if no values are present.
public double MinX { get; }Adds a coordinate pair to the interpolation set.
public bool Add(double x, double y);The X coordinate.
The Y coordinate.
System.Boolean
True if the point was added; false if either X or Y is System.Double.NaN.
Adds a coordinate pair to the interpolation set.
public bool Add(System.Collections.Generic.KeyValuePair<double,double> keyValuePair);keyValuePair System.Collections.Generic.KeyValuePair<System.Double,System.Double>
A System.Collections.Generic.KeyValuePair<> where Key is X and Value is Y.
System.Boolean
True if the point was successfully added; otherwise, false.
Calculates a single interpolated Y value for the given X coordinate.
public double CalculateY(double x);The X coordinate to interpolate.
System.Double
The interpolated Y value, or System.Double.NaN if interpolation is not possible.
Calculates a list of interpolated Y values for the given X coordinate.
public System.Collections.Generic.List<double>? CalculateYs(double x, int maxCount=int.MaxValue);The X coordinate to interpolate.
maxCount System.Int32
The maximum number of results to return.
System.Collections.Generic.List<System.Double>
A System.Collections.Generic.List<> of interpolated Y values, or null if the input is invalid or out of range.
Checks whether the specified X coordinate falls within the range defined by the minimum and maximum stored X values.
public bool InRange(double x);The X coordinate to check.
System.Boolean
True if the value is within the inclusive range [MinX, MaxX]; otherwise, false.
Represents a mathematical matrix with double-precision floating-point elements.
public class Matrix : DiGi.Core.Classes.SerializableObject, DiGi.Math.Interfaces.IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Matrix
Derived
↳ Matrix2D
↳ Matrix3D
↳ Matrix4D
Implements IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the Matrix class by copying another matrix.
public Matrix(DiGi.Math.Classes.Matrix? matrix);matrix Matrix
The source matrix to copy.
Initializes a new instance of the Matrix class from a 2D array of values.
public Matrix(double[,]? values);values System.Double[]
The 2D array containing the matrix elements.
Initializes a new instance of the Matrix class from a 1D array of values.
public Matrix(double[]? values);values System.Double[]
An array of values to be used as the first row of the matrix.
Initializes a new instance of the Matrix class with the specified number of rows and columns.
public Matrix(int rowCount, int columnCount);rowCount System.Int32
The number of rows in the matrix.
columnCount System.Int32
The number of columns in the matrix.
Initializes a new instance of the Matrix class from a JSON object.
public Matrix(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing matrix data.
Gets or sets the element at the specified row and column.
public double this[int row, int column] { get; set; }row System.Int32
The zero-based index of the row.
column System.Int32
The zero-based index of the column.
Creates a shallow copy of the current matrix.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A clone of the current matrix.
Gets the number of columns in the matrix.
public int ColumnCount();System.Int32
The column count, or -1 if values are null.
Counts the number of rows that contain at least one non-zero element.
public int CountNonZeroRows(double tolerance=1E-06);tolerance System.Double
The tolerance value for determining if an element is non-zero.
System.Int32
The count of non-zero rows.
Calculates the determinant of the matrix.
public double Determinant();System.Double
The determinant value, or NaN if the matrix is not square or values are null.
Calculates the eigenvalues of a 3x3 symmetric matrix.
public double[]? Eigenvalues(double tolerance=1E-06);tolerance System.Double
The tolerance value for symmetry check.
System.Double[]
An array containing the real eigenvalues, or null if calculation fails.
System.NotImplementedException
Thrown when matrix is not 3x3 or not symmetric.
Determines whether the specified object is equal to the current matrix.
public override bool Equals(object? obj);obj System.Object
The object to compare with the current matrix.
System.Boolean
True if the objects are equal; otherwise, false.
Populates the object's properties from a JsonObject.
public override bool FromJsonObject(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject containing the data to populate the object.
Implements FromJsonObject(JsonObject)
System.Boolean
True if the object was successfully populated; otherwise, false.
Generates the matrix of cofactors for the current matrix, where each element is the signed minor determinant (-1)^(row+column) multiplied by the determinant of the corresponding minor matrix.
public DiGi.Math.Classes.Matrix? GetCofactorsMatrix();Matrix
The cofactor matrix, or null if values are null or the matrix is not square.
Gets the hash code for the current matrix.
public override int GetHashCode();System.Int32
A 32-bit signed integer hash code.
Returns a new matrix that is the inverse of the current matrix.
public DiGi.Math.Classes.Matrix? GetInversed();Matrix
The inversed matrix, or null if the matrix is not square.
Gets the minor matrix obtained by removing the specified row and column.
public DiGi.Math.Classes.Matrix? GetMinorMatrix(int row, int column);row System.Int32
The index of the row to remove.
column System.Int32
The index of the column to remove.
Matrix
The resulting minor matrix, or null if values are null or dimensions are too small.
Generates the matrix of minors for the current matrix.
public DiGi.Math.Classes.Matrix? GetMinorsMatrix();Matrix
The matrix of minors, or null if values are null.
Returns a new matrix that is the transpose of the current matrix.
public DiGi.Math.Classes.Matrix? GetTransposed();Matrix
The transposed matrix.
Inverts the current matrix in place.
public void Inverse();Determines whether the current matrix is square.
public bool IsSquare();System.Boolean
True if the matrix is square; otherwise, false.
Multiplies the current matrix by another matrix.
public DiGi.Math.Classes.Matrix? Multiply(DiGi.Math.Classes.Matrix? matrix);matrix Matrix
The matrix to multiply with.
Matrix
The result of the multiplication, or null if dimensions are incompatible.
Multiplies every element of the current matrix by a scalar value.
public DiGi.Math.Classes.Matrix? Multiply(double value);value System.Double
The scalar value.
Matrix
The result of the multiplication, or null if values are null.
Negates every element of the current matrix in place.
public void Negate();Calculates a tolerance value for Row Echelon Form based on matrix dimensions and maximum row sum.
public double REFTolerance(double tolerance=1E-06);tolerance System.Double
The base tolerance value.
System.Double
The calculated REF tolerance.
Rounds every element of the current matrix to the specified tolerance in place.
public void Round(double tolerance=1E-06);tolerance System.Double
The precision to round to.
Gets the number of rows in the matrix.
public int RowCount();System.Int32
The row count, or -1 if values are null.
Transforms the matrix into row echelon form or reduced row echelon form.
public DiGi.Math.Classes.Matrix? RowEchelonForm(bool reduced=true, double tolerance=1E-06);reduced System.Boolean
If true, calculates the reduced row echelon form.
tolerance System.Double
The tolerance for zero detection during elimination.
Matrix
A new matrix in (reduced) row echelon form, or null if cloning fails.
Sets all elements of the current matrix to a specified value in place.
public void SetValues(double value);value System.Double
The value to set.
Returns a new matrix containing the dimensions of the current matrix.
public DiGi.Math.Classes.Matrix? Size();Matrix
A 1x2 matrix with row and column counts, or null if values are null.
Checks if the current matrix has the same dimensions as another matrix.
public bool SizeEqual(DiGi.Math.Classes.Matrix? matrix);matrix Matrix
The other matrix to compare.
System.Boolean
True if sizes are equal; otherwise, false.
Converts the current matrix to a 2D array of doubles.
public double[,]? ToArray();System.Double[]
A copy of the matrix elements as a 2D array, or null if values are null.
Converts the object into a JsonObject for serialization.
public override System.Text.Json.Nodes.JsonObject? ToJsonObject();Implements ToJsonObject()
System.Text.Json.Nodes.JsonObject
A System.Text.Json.Nodes.JsonObject representation of the object, or null if conversion fails.
Transposes the current matrix in place.
public void Transpose();Adds two matrices together element-wise.
public static DiGi.Math.Classes.Matrix? operator +(DiGi.Math.Classes.Matrix? matrix_1, DiGi.Math.Classes.Matrix? matrix_2);matrix_1 Matrix
The first matrix to add.
matrix_2 Matrix
The second matrix to add.
Matrix
A new Matrix containing the sum of the two matrices, or null if either input is null or if the matrices have different dimensions.
Adds a scalar value to every element of the matrix.
public static DiGi.Math.Classes.Matrix? operator +(DiGi.Math.Classes.Matrix? matrix, double value);matrix Matrix
The matrix to which the scalar value will be added.
value System.Double
The scalar value to add to each element.
Matrix
A new Matrix containing the result of the addition, or null if the input matrix is null.
Explicitly converts a two-dimensional array of doubles to a Matrix.
public static DiGi.Math.Classes.Matrix? explicit operator DiGi.Math.Classes.Matrix?(double[,]? values);values System.Double[]
The two-dimensional array of doubles to convert.
Matrix
A new Matrix instance created from the provided values, or null if the input array is null.
Multiplies two matrices together using matrix multiplication.
public static DiGi.Math.Classes.Matrix? operator *(DiGi.Math.Classes.Matrix? matrix_1, DiGi.Math.Classes.Matrix? matrix_2);matrix_1 Matrix
The first matrix to multiply.
matrix_2 Matrix
The second matrix to multiply.
Matrix
A new Matrix representing the product of the two matrices, or null if either input is null or if the number of columns in the first matrix does not match the number of rows in the second matrix.
Multiplies every element of the matrix by a scalar value.
public static DiGi.Math.Classes.Matrix? operator *(DiGi.Math.Classes.Matrix? matrix, double value);matrix Matrix
The matrix to be multiplied.
value System.Double
The scalar value to multiply each element by.
Matrix
A new Matrix containing the result of the multiplication, or null if the input matrix is null.
Subtracts the second matrix from the first matrix element-wise.
public static DiGi.Math.Classes.Matrix? operator -(DiGi.Math.Classes.Matrix? matrix_1, DiGi.Math.Classes.Matrix? matrix_2);matrix_1 Matrix
The first matrix to subtract from.
matrix_2 Matrix
The second matrix to be subtracted.
Matrix
A new Matrix containing the result of the subtraction, or null if either input is null or the matrices have different dimensions.
Subtracts a scalar value from every element of the matrix.
public static DiGi.Math.Classes.Matrix? operator -(DiGi.Math.Classes.Matrix? matrix, double value);matrix Matrix
The matrix to subtract the value from.
value System.Double
The scalar value to be subtracted from each element.
Matrix
A new Matrix representing the result of the subtraction, or null if the input matrix is null.
Represents a 2x2 square matrix providing specialized mathematical operations and serialization capabilities.
public class Matrix2D : DiGi.Math.Classes.Matrix, DiGi.Math.Interfaces.ISquareMatrix, DiGi.Math.Interfaces.IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Matrix → Matrix2D
Implements ISquareMatrix, IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the Matrix2D class with default dimensions of 2x2.
public Matrix2D();Initializes a new instance of the Matrix2D class by copying the values from an existing Matrix2D instance.
public Matrix2D(DiGi.Math.Classes.Matrix2D? matrix2D);matrix2D Matrix2D
The source matrix to copy.
Initializes a new instance of the Matrix2D class using the provided JSON object for deserialization.
public Matrix2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject containing the matrix data.
Creates a deep copy of the current Matrix2D instance.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject representing the cloned matrix, or null.
Adds two Matrix2D instances together.
public static DiGi.Math.Classes.Matrix2D? operator +(DiGi.Math.Classes.Matrix2D? matrix2D_1, DiGi.Math.Classes.Matrix2D? matrix2D_2);matrix2D_1 Matrix2D
The first matrix operand.
matrix2D_2 Matrix2D
The second matrix operand to add to the first.
Matrix2D
The result of the addition as a Matrix2D, or null if either operand is null.
Adds a scalar value to every element of the Matrix2D.
public static DiGi.Math.Classes.Matrix2D? operator +(DiGi.Math.Classes.Matrix2D? matrix2D, double value);matrix2D Matrix2D
The matrix operand.
value System.Double
The scalar value to add.
Matrix2D
A new Matrix2D containing the result, or null if the matrix is null.
Explicitly converts a two-dimensional array of doubles into a Matrix2D instance.
public static DiGi.Math.Classes.Matrix2D? explicit operator DiGi.Math.Classes.Matrix2D?(double[,]? values);values System.Double[]
The 2D double array to convert.
Matrix2D
A Matrix2D instance created from the values, or null if the input is null.
Performs matrix multiplication between two Matrix2D instances.
public static DiGi.Math.Classes.Matrix2D? operator *(DiGi.Math.Classes.Matrix2D? matrix2D_1, DiGi.Math.Classes.Matrix2D? matrix2D_2);matrix2D_1 Matrix2D
The left-hand side matrix operand.
matrix2D_2 Matrix2D
The right-hand side matrix operand.
Matrix2D
The resulting product as a Matrix2D, or null if either operand is null.
Multiplies every element of the Matrix2D by a scalar value.
public static DiGi.Math.Classes.Matrix2D? operator *(DiGi.Math.Classes.Matrix2D? matrix2D, double value);matrix2D Matrix2D
The matrix operand.
value System.Double
The scalar multiplier.
Matrix2D
A new Matrix2D containing the result, or null if the matrix is null.
Subtracts one Matrix2D from another.
public static DiGi.Math.Classes.Matrix2D? operator -(DiGi.Math.Classes.Matrix2D? matrix2D_1, DiGi.Math.Classes.Matrix2D? matrix2D_2);matrix2D_1 Matrix2D
The first matrix operand.
matrix2D_2 Matrix2D
The second matrix operand to subtract from the first.
Matrix2D
The result of the subtraction as a Matrix2D, or null if either operand is null.
Subtracts a scalar value from every element of the Matrix2D.
public static DiGi.Math.Classes.Matrix2D? operator -(DiGi.Math.Classes.Matrix2D? matrix2D, double value);matrix2D Matrix2D
The matrix operand.
value System.Double
The scalar value to subtract.
Matrix2D
A new Matrix2D containing the result, or null if the matrix is null.
Represents a 3x3 square matrix used for three-dimensional mathematical operations.
public class Matrix3D : DiGi.Math.Classes.Matrix, DiGi.Math.Interfaces.ISquareMatrix, DiGi.Math.Interfaces.IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Matrix → Matrix3D
Implements ISquareMatrix, IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the Matrix3D class as a 3x3 matrix.
public Matrix3D();Initializes a new instance of the Matrix3D class by copying an existing Matrix3D instance.
public Matrix3D(DiGi.Math.Classes.Matrix3D? matrix3D);matrix3D Matrix3D
The source Matrix3D to copy.
Initializes a new instance of the Matrix3D class from the specified JSON object.
public Matrix3D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject containing the matrix data.
Creates a deep copy of the current Matrix3D instance.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject representing the cloned matrix.
Adds two Matrix3D instances together.
public static DiGi.Math.Classes.Matrix3D? operator +(DiGi.Math.Classes.Matrix3D? matrix3D_1, DiGi.Math.Classes.Matrix3D? matrix3D_2);matrix3D_1 Matrix3D
The first Matrix3D.
matrix3D_2 Matrix3D
The second Matrix3D to add to the first.
Matrix3D
The result of the addition as a Matrix3D, or null if either operand is null.
Adds a scalar value to each element of the Matrix3D.
public static DiGi.Math.Classes.Matrix3D? operator +(DiGi.Math.Classes.Matrix3D? matrix3D, double value);matrix3D Matrix3D
The Matrix3D instance.
value System.Double
The double value to add.
Matrix3D
A new Matrix3D containing the result, or null if the matrix is null.
Explicitly converts a two-dimensional array of doubles to a Matrix3D.
public static DiGi.Math.Classes.Matrix3D? explicit operator DiGi.Math.Classes.Matrix3D?(double[,]? values);values System.Double[]
The 2D double array containing the matrix elements.
Matrix3D
A Matrix3D instance created from the values, or null if the input is null.
Performs matrix multiplication between two Matrix3D instances.
public static DiGi.Math.Classes.Matrix3D? operator *(DiGi.Math.Classes.Matrix3D? matrix3D_1, DiGi.Math.Classes.Matrix3D? matrix3D_2);matrix3D_1 Matrix3D
The left-hand side Matrix3D.
matrix3D_2 Matrix3D
The right-hand side Matrix3D.
Matrix3D
The resulting Matrix3D from the multiplication, or null if either operand is null.
Multiplies each element of the Matrix3D by a scalar value.
public static DiGi.Math.Classes.Matrix3D? operator *(DiGi.Math.Classes.Matrix3D? matrix3D, double value);matrix3D Matrix3D
The Matrix3D instance.
value System.Double
The double value to multiply by.
Matrix3D
A new Matrix3D containing the result, or null if the matrix is null.
Subtracts one Matrix3D from another.
public static DiGi.Math.Classes.Matrix3D? operator -(DiGi.Math.Classes.Matrix3D? matrix3D_1, DiGi.Math.Classes.Matrix3D? matrix3D_2);matrix3D_1 Matrix3D
The first Matrix3D.
matrix3D_2 Matrix3D
The second Matrix3D to subtract from the first.
Matrix3D
The result of the subtraction as a Matrix3D, or null if either operand is null.
Subtracts a scalar value from each element of the Matrix3D.
public static DiGi.Math.Classes.Matrix3D? operator -(DiGi.Math.Classes.Matrix3D? matrix3D, double value);matrix3D Matrix3D
The Matrix3D instance.
value System.Double
The double value to subtract.
Matrix3D
A new Matrix3D containing the result, or null if the matrix is null.
Represents a 4x4 square matrix providing mathematical operations and serialization capabilities.
public class Matrix4D : DiGi.Math.Classes.Matrix, DiGi.Math.Interfaces.ISquareMatrix, DiGi.Math.Interfaces.IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Matrix → Matrix4D
Implements ISquareMatrix, IMatrix, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the Matrix4D class as a 4x4 matrix.
public Matrix4D();Initializes a new instance of the Matrix4D class by copying an existing matrix.
public Matrix4D(DiGi.Math.Classes.Matrix4D? matrix4D);matrix4D Matrix4D
The source Matrix4D to copy.
Initializes a new instance of the Matrix4D class using a JSON object.
public Matrix4D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject containing the matrix data.
Creates a deep copy of the current Matrix4D instance.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject representing the cloned matrix, or null.
Adds two Matrix4D matrices together.
public static DiGi.Math.Classes.Matrix4D? operator +(DiGi.Math.Classes.Matrix4D? matrix4D_1, DiGi.Math.Classes.Matrix4D? matrix4D_2);matrix4D_1 Matrix4D
The first matrix.
matrix4D_2 Matrix4D
The second matrix to add to the first.
Matrix4D
The result of the addition as a Matrix4D, or null if either operand is null.
Adds a scalar value to each element of the Matrix4D.
public static DiGi.Math.Classes.Matrix4D? operator +(DiGi.Math.Classes.Matrix4D? matrix4D, double value);matrix4D Matrix4D
The matrix to add to.
value System.Double
The scalar value to add.
Matrix4D
A new Matrix4D containing the result, or null if the matrix is null.
Explicitly converts a two-dimensional array of doubles to a Matrix4D.
public static DiGi.Math.Classes.Matrix4D? explicit operator DiGi.Math.Classes.Matrix4D?(double[,]? values);values System.Double[]
The 2D double array containing the matrix elements.
Matrix4D
A Matrix4D instance created from the values, or null if the input is null.
Multiplies two Matrix4D matrices.
public static DiGi.Math.Classes.Matrix4D? operator *(DiGi.Math.Classes.Matrix4D? matrix4D_1, DiGi.Math.Classes.Matrix4D? matrix4D_2);matrix4D_1 Matrix4D
The first matrix.
matrix4D_2 Matrix4D
The second matrix.
Matrix4D
The result of the multiplication as a Matrix4D, or null if either operand is null.
Multiplies each element of the Matrix4D by a scalar value.
public static DiGi.Math.Classes.Matrix4D? operator *(DiGi.Math.Classes.Matrix4D? matrix4D, double value);matrix4D Matrix4D
The matrix to multiply.
value System.Double
The scalar multiplier.
Matrix4D
A new Matrix4D containing the result, or null if the matrix is null.
Subtracts one Matrix4D from another.
public static DiGi.Math.Classes.Matrix4D? operator -(DiGi.Math.Classes.Matrix4D? matrix4D_1, DiGi.Math.Classes.Matrix4D? matrix4D_2);matrix4D_1 Matrix4D
The first matrix.
matrix4D_2 Matrix4D
The second matrix to subtract from the first.
Matrix4D
The result of the subtraction as a Matrix4D, or null if either operand is null.
Subtracts a scalar value from each element of the Matrix4D.
public static DiGi.Math.Classes.Matrix4D? operator -(DiGi.Math.Classes.Matrix4D? matrix4D, double value);matrix4D Matrix4D
The matrix to subtract from.
value System.Double
The scalar value to subtract.
Matrix4D
A new Matrix4D containing the result, or null if the matrix is null.
Represents a polynomial equation of the form a(n)*x^(n) + a(n-1)*x^(n-1) + a(n-2)*x^(n-2) + [...] + a(1)*x + a(0) = 0.
public class PolynomialEquation : DiGi.Core.Classes.SerializableObject, DiGi.Math.Interfaces.IEquation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → PolynomialEquation
Implements IEquation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the PolynomialEquation class using another PolynomialEquation object.
public PolynomialEquation(DiGi.Math.Classes.PolynomialEquation? polynomialEquation);polynomialEquation PolynomialEquation
The PolynomialEquation to copy from.
Initializes a new instance of the PolynomialEquation class using coefficients.
public PolynomialEquation(System.Collections.Generic.IEnumerable<double>? coefficients);coefficients System.Collections.Generic.IEnumerable<System.Double>
The coefficients of the polynomial equation.
Initializes a new instance of the PolynomialEquation class using a System.Text.Json.Nodes.JsonObject.
public PolynomialEquation(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing the polynomial equation data.
Gets the coefficients of the polynomial equation.
public System.Collections.Generic.List<double>? Coefficients { get; }System.Collections.Generic.List<System.Double>
Gets the degree of the polynomial equation.
public int Degree { get; }Evaluates the polynomial equation for a given x value.
public double Evaluate(double value);value System.Double
The x value to evaluate the polynomial equation for.
Implements Evaluate(double)
System.Double
The result of the polynomial equation.
Evaluates the polynomial equation for a given set of x values.
public System.Collections.Generic.List<double>? Evaluate(System.Collections.Generic.IEnumerable<double>? values);values System.Collections.Generic.IEnumerable<System.Double>
The x values to evaluate the polynomial equation for.
Implements Evaluate(IEnumerable<double>)
System.Collections.Generic.List<System.Double>
The results of the polynomial equation.
Explicitly converts a LinearEquation to a PolynomialEquation.
public static DiGi.Math.Classes.PolynomialEquation? explicit operator DiGi.Math.Classes.PolynomialEquation?(DiGi.Math.Classes.LinearEquation? linearEquation);linearEquation LinearEquation
The linear equation to convert.
PolynomialEquation
A PolynomialEquation instance created from the provided linear equation, or null if the input is null.