Skip to content

Commit d096317

Browse files
authored
Merge pull request #47 from wo80/dev
Release version 4.1.0
2 parents f145e93 + 0a0b350 commit d096317

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

CSparse/CSparse.csproj

+11-4
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,27 @@
1111
<Company />
1212
<Copyright>Copyright Christian Woltering © 2012-2024</Copyright>
1313
<Authors>Christian Woltering</Authors>
14-
<AssemblyVersion>4.0.0.0</AssemblyVersion>
15-
<FileVersion>4.0.0.0</FileVersion>
14+
<AssemblyVersion>4.1.0.0</AssemblyVersion>
15+
<FileVersion>4.1.0.0</FileVersion>
1616
<PackageTags>math sparse matrix lu cholesky qr decomposition factorization </PackageTags>
17-
<Version>4.0.0</Version>
17+
<Version>4.1.0</Version>
1818
<AssemblyName>CSparse</AssemblyName>
1919
<RootNamespace>CSparse</RootNamespace>
2020
<PackageLicenseExpression>LGPL-2.1-only</PackageLicenseExpression>
2121
<PackageProjectUrl>https://github.com/wo80/CSparse.NET</PackageProjectUrl>
2222
<RepositoryUrl>https://github.com/wo80/CSparse.NET.git</RepositoryUrl>
2323
<RepositoryType>git</RepositoryType>
2424
<PackageReleaseNotes>
25+
Version 4.1.0
26+
27+
* Add overload for creating a sparse matrix from an enumerable of ValueTuple.
28+
* Add matrix EnumerateIndexedAsValueTuples() to enumerate entries as ValueTuple.
29+
30+
Version 4.0.0
31+
2532
The major version change is due to the removal of obsolete methods in the Converter class. Visibility of that class was changed from public to internal. In case those obsolete methods were still used, please switch to the static conversion methods provided by the SparseMatrix class.
2633

27-
Other changes in version 4.0.0:
34+
Other changes in this version:
2835

2936
* Addition of helper method Helper.ValidateStorage(...) to validate the structure of a sparse matrix.
3037
* Update to GetHashCode() method of CompressedColumnStorage class.

CSparse/Storage/CompressedColumnStorage.cs

+9
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ public static CompressedColumnStorage<T> OfIndexed(int rows, int columns, IEnume
172172
/// <summary>
173173
/// Create a new sparse matrix as a copy of the given array (row-major).
174174
/// </summary>
175+
/// <param name="rows">The number of rows.</param>
176+
/// <param name="columns">The number of columns.</param>
177+
/// <param name="rowMajor">The dense matrix values in row-major order.</param>
175178
public static CompressedColumnStorage<T> OfRowMajor(int rows, int columns, T[] rowMajor)
176179
{
177180
var c = Converter.FromRowMajorArray<T>(rowMajor, rows, columns);
@@ -182,6 +185,9 @@ public static CompressedColumnStorage<T> OfRowMajor(int rows, int columns, T[] r
182185
/// <summary>
183186
/// Create a new sparse matrix as a copy of the given array (column-major).
184187
/// </summary>
188+
/// <param name="rows">The number of rows.</param>
189+
/// <param name="columns">The number of columns.</param>
190+
/// <param name="columnMajor">The dense matrix values in column-major order.</param>
185191
public static CompressedColumnStorage<T> OfColumnMajor(int rows, int columns, T[] columnMajor)
186192
{
187193
var c = Converter.FromColumnMajorArray<T>(columnMajor, rows, columns);
@@ -192,6 +198,7 @@ public static CompressedColumnStorage<T> OfColumnMajor(int rows, int columns, T[
192198
/// <summary>
193199
/// Create a new square sparse matrix with the diagonal as a copy of the given array.
194200
/// </summary>
201+
/// <param name="diagonal">The matrix diagonal values.</param>
195202
public static CompressedColumnStorage<T> OfDiagonalArray(T[] diagonal)
196203
{
197204
int order = diagonal.Length;
@@ -587,6 +594,8 @@ public override IEnumerable<Tuple<int, int, T>> EnumerateIndexed()
587594
}
588595
}
589596

597+
// TODO: [v5] remove method below and only provide one method using value-tuples
598+
590599
/// <inheritdoc />
591600
public override IEnumerable<(int row, int column, T value)> EnumerateIndexedAsValueTuples()
592601
{

0 commit comments

Comments
 (0)