Skip to content

Commit

Permalink
Merge pull request #47 from wo80/dev
Browse files Browse the repository at this point in the history
Release version 4.1.0
  • Loading branch information
wo80 authored Jun 14, 2024
2 parents f145e93 + 0a0b350 commit d096317
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
15 changes: 11 additions & 4 deletions CSparse/CSparse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,27 @@
<Company />
<Copyright>Copyright Christian Woltering © 2012-2024</Copyright>
<Authors>Christian Woltering</Authors>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<FileVersion>4.0.0.0</FileVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<FileVersion>4.1.0.0</FileVersion>
<PackageTags>math sparse matrix lu cholesky qr decomposition factorization </PackageTags>
<Version>4.0.0</Version>
<Version>4.1.0</Version>
<AssemblyName>CSparse</AssemblyName>
<RootNamespace>CSparse</RootNamespace>
<PackageLicenseExpression>LGPL-2.1-only</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/wo80/CSparse.NET</PackageProjectUrl>
<RepositoryUrl>https://github.com/wo80/CSparse.NET.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>
Version 4.1.0

* Add overload for creating a sparse matrix from an enumerable of ValueTuple.
* Add matrix EnumerateIndexedAsValueTuples() to enumerate entries as ValueTuple.

Version 4.0.0

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.

Other changes in version 4.0.0:
Other changes in this version:

* Addition of helper method Helper.ValidateStorage(...) to validate the structure of a sparse matrix.
* Update to GetHashCode() method of CompressedColumnStorage class.
Expand Down
9 changes: 9 additions & 0 deletions CSparse/Storage/CompressedColumnStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ public static CompressedColumnStorage<T> OfIndexed(int rows, int columns, IEnume
/// <summary>
/// Create a new sparse matrix as a copy of the given array (row-major).
/// </summary>
/// <param name="rows">The number of rows.</param>
/// <param name="columns">The number of columns.</param>
/// <param name="rowMajor">The dense matrix values in row-major order.</param>
public static CompressedColumnStorage<T> OfRowMajor(int rows, int columns, T[] rowMajor)
{
var c = Converter.FromRowMajorArray<T>(rowMajor, rows, columns);
Expand All @@ -182,6 +185,9 @@ public static CompressedColumnStorage<T> OfRowMajor(int rows, int columns, T[] r
/// <summary>
/// Create a new sparse matrix as a copy of the given array (column-major).
/// </summary>
/// <param name="rows">The number of rows.</param>
/// <param name="columns">The number of columns.</param>
/// <param name="columnMajor">The dense matrix values in column-major order.</param>
public static CompressedColumnStorage<T> OfColumnMajor(int rows, int columns, T[] columnMajor)
{
var c = Converter.FromColumnMajorArray<T>(columnMajor, rows, columns);
Expand All @@ -192,6 +198,7 @@ public static CompressedColumnStorage<T> OfColumnMajor(int rows, int columns, T[
/// <summary>
/// Create a new square sparse matrix with the diagonal as a copy of the given array.
/// </summary>
/// <param name="diagonal">The matrix diagonal values.</param>
public static CompressedColumnStorage<T> OfDiagonalArray(T[] diagonal)
{
int order = diagonal.Length;
Expand Down Expand Up @@ -587,6 +594,8 @@ public override IEnumerable<Tuple<int, int, T>> EnumerateIndexed()
}
}

// TODO: [v5] remove method below and only provide one method using value-tuples

/// <inheritdoc />
public override IEnumerable<(int row, int column, T value)> EnumerateIndexedAsValueTuples()
{
Expand Down

0 comments on commit d096317

Please sign in to comment.