-
Notifications
You must be signed in to change notification settings - Fork 9
MGroup.LinearAlgebra.Commons
Dimitris Tsapetis edited this page Apr 17, 2019
·
1 revision
Low level array operations to convert between matrix storage formats. Authors: Serafeim Bakalakos
public static class MGroup.LinearAlgebra.Commons.Conversions
Static Methods
Type | Name | Summary |
---|---|---|
Double[,] |
Array2DLowerToSymmetric(Double[,] array2D) |
|
Double[] |
Array2DToFullColMajor(Double[,] array2D) |
|
Double[] |
Array2DToFullRowMajor(Double[,] array2D) |
|
Double[] |
Array2DToPackedLowerColMajor(Double[,] array2D) |
|
Double[] |
Array2DToPackedLowerRowMajor(Double[,] array2D) |
|
Double[] |
Array2DToPackedUpperColMajor(Double[,] array2D) |
|
Double[] |
Array2DToPackedUpperRowMajor(Double[,] array2D) |
|
Double[,] |
Array2DUpperToSymmetric(Double[,] array2D) |
|
Double[] |
ColumnMajorToRowMajor(Double[] colMajor, Int32 numRows, Int32 numCols) |
|
void |
CopyUpperToLowerColMajor(Double[] squareFullMatrix, Int32 order) |
|
Double[,] |
FullColMajorToArray2D(Double[] array1D, Int32 numRows, Int32 numColumns) |
|
Double[] |
FullColMajorToFullLowerColMajor(Double[] full, Boolean unitDiagonal) |
Extract the lower part only. Both I/O are column major with full storage. |
Double[] |
FullColMajorToFullLowerRowMajor(Double[] full, Boolean unitDiagonal) |
Extract the lower part only. Both I/O are column major with full storage. |
Double[] |
FullColMajorToFullUpperColMajor(Double[] full, Boolean unitDiagonal) |
Extract the upper part only. Both I/O are column major with full storage. |
Double[] |
FullColMajorToPackedLowerColMajor(Int32 order, Double[] full) |
Extract the lower part only. Both I/O are column major with full storage. |
void |
FullColMajorToPackedLowerColMajor(Int32 order, Double[] full, Double[] packedLower, Int32 offsetLower) |
Extract the lower part only. Both I/O are column major with full storage. |
Double[] |
FullColMajorToPackedUpperColMajor(Int32 order, Double[] full) |
Extract the upper part only. Both I/O are column major with full storage. |
void |
FullColMajorToPackedUpperColMajor(Int32 order, Double[] full, Double[] packedUpper, Int32 offsetUpper) |
Extract the upper part only. Both I/O are column major with full storage. |
Int32 |
FullLengthToOrder(Int32 length) |
|
Double[,] |
FullLowerColMajorToArray2D(Double[] array1D, Boolean unitDiagonal) |
|
Double[,] |
FullRowMajorToArray2D(Double[] array1D, Int32 numRows, Int32 numColumns) |
|
Double[,] |
FullUpperColMajorToArray2D(Double[] array1D, Boolean unitDiagonal) |
|
Int32 |
PackedLengthToOrder(Int32 length) |
|
Double[,] |
PackedLowerColMajorToArray2D(Double[] array1D) |
|
Double[,] |
PackedLowerRowMajorToArray2D(Double[] array1D) |
|
Double[] |
PackedLowerRowMajorToFullColMajor(Double[] packed, Int32 order = 0) |
|
Double[,] |
PackedUpperColMajorToArray2D(Double[] array1D, Int32 order = 0) |
|
Double[,] |
PackedUpperColMajorToArray2DSymm(Double[] packed, Int32 order = 0) |
|
Double[] |
PackedUpperColMajorToFullColMajor(Double[] packed, Int32 order = 0) |
|
Double[] |
PackedUpperColMajorToFullSymmColMajor(Double[] packed, Int32 order = 0) |
Converts a symmetric matrix from packed column major format to full column major format. |
Double[] |
PackedUpperRowMajorPackedUpperColMajor(Int32 order, Double[] rowMajor) |
|
Double[,] |
PackedUpperRowMajorToArray2D(Double[] array1D) |
|
Double[] |
RectColMajorToPackedLowerColMajor(Int32 numRows, Int32 numCols, Double[] rect) |
|
Double[] |
RectColMajorToPackedUpperColMajor(Int32 numRows, Int32 numCols, Double[] rect) |
|
Double[] |
RectColMajorToRectLowerColMajor(Int32 numRows, Int32 numCols, Double[] rect) |
Extract the lower trapezoid (subdiagonal) part only. Both I/O are column major with full storage. Appropriate for rectangular matrices. |
Double[] |
RectColMajorToRectUpperColMajor(Int32 numRows, Int32 numCols, Double[] rect) |
Extract the upper trapezoid (superdiagonal) part only. Both I/O are column major with full storage. Appropriate for rectangular matrices. |
Double[] |
RectColMajorToSquareFullLowerColMajor(Int32 numRows, Int32 numCols, Double[] rect) |
|
Double[] |
RectColMajorToSquareFullUpperColMajor(Int32 numRows, Int32 numCols, Double[] rect) |
|
Double[] |
RectColMajorToSquarePackedUpperColMajor(Int32 numRows, Int32 numCols, Double[] rect) |
Property of a symmetric matrix. For more see: . Authors: Serafeim Bakalakos
public enum MGroup.LinearAlgebra.Commons.DefiniteProperty
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
PositiveDefinite | We are sure that the matrix is positive definite. |
1 |
PositiveSemiDefinite | We are sure that the matrix is positive semi-definite (including positive definite). |
2 |
Indefinite | We are sure that the matrix is not positive definite, positive semi-definite, negative definite or negative semi-definite. |
3 |
Unknown | We do not yet know the definiteness of the matrix. |
Utility methods for parallel vector operations. Authors: George Stavroulakis
public static class MGroup.LinearAlgebra.Commons.ParallelExtensions
Static Fields
Type | Name | Summary |
---|---|---|
Int32 |
AffinityCount |
Static Methods
Type | Name | Summary |
---|---|---|
void |
AssignTotalAffinityCount() | |
void |
AssignTotalAffinityCount(Int32 count) |
|
IEnumerable<Tuple<Int32, Int32, Int32>> |
PartitionLimits(this T[] vector, Int32 chunks) |
|
IEnumerable<Tuple<Int32, Int32, Int32>> |
PartitionLimits(this Double[] vector, Int32 chunks) |
|
IEnumerable<Tuple<Int32, Int32, Int32>> |
PartitionLimits(this IVectorView vector, Int32 chunks) |
Checks for the compatibility of vector or matrix dimensions for various operations and for the indices. Also templates for exception messages. Authors: Serafeim Bakalakos
public static class MGroup.LinearAlgebra.Commons.Preconditions
Static Methods
Type | Name | Summary |
---|---|---|
Boolean |
AreSameMatrixDimensions(IIndexable2D matrix1, IIndexable2D matrix2) |
|
void |
CheckIndex1D(IVectorView vector, Int32 idx) |
|
void |
CheckIndexCol(IIndexable2D matrix, Int32 colIdx) |
|
void |
CheckIndexRow(IIndexable2D matrix, Int32 rowIdx) |
|
void |
CheckIndices(IIndexable2D matrix, Int32 rowIdx, Int32 colIdx) |
|
void |
CheckMultiplicationDimensions(IIndexable2D leftMatrix, IIndexable2D rightMatrix) |
|
void |
CheckMultiplicationDimensions(Int32 leftColumns, Int32 rightRows) |
|
void |
CheckMultiplicationDimensions(IIndexable2D matrix, IVectorView lhsVector, Int32 lhsOffset, IVectorView rhsVector, Int32 rhsOffset, Boolean transposeMatrix) |
|
void |
CheckMultiplicationDimensionsSection(IIndexable2D matrixLeft, IVectorView vectorRight, Int32 vectorStart, IVectorView result, Int32 resultStart) |
|
void |
CheckSameColDimension(IIndexable2D matrix, IVectorView vector) |
|
void |
CheckSameColDimension(IIndexable2D matrix1, IIndexable2D matrix2) |
|
void |
CheckSameMatrixDimensions(IIndexable2D matrix1, IIndexable2D matrix2) |
|
void |
CheckSameRowDimension(IIndexable2D matrix, IVectorView vector) |
|
void |
CheckSameRowDimension(IIndexable2D matrix1, IIndexable2D matrix2) |
|
void |
CheckSquare(IIndexable2D matrix) |
|
void |
CheckSquare(Int32 numRows, Int32 numColumns) |
|
void |
CheckSubvectorDimensions(IIndexable1D vector, Int32 startIndex, Int32 subvectorLength) |
|
void |
CheckSystemSolutionDimensions(IIndexable2D matrix, IVectorView rhsVector) |
|
void |
CheckSystemSolutionDimensions(Int32 matrixRows, Int32 rhsVectorLength) |
|
void |
CheckVectorDimensions(Double[] vector1, Double[] vector2) |
|
void |
CheckVectorDimensions(IIndexable1D vector1, IIndexable1D vector2) |
public class MGroup.LinearAlgebra.Commons.ValueComparer
Methods
Type | Name | Summary |
---|---|---|
Boolean |
AreEqual(Double val1, Double val2) |