GitHub - encoord/CSparse.NET: A concise library for solving sparse linear systems with direct methods.

Build Status Nuget downloads open issues

A concise library for solving sparse linear systems with direct methods. The code is a C# port of CSparse, written by Tim Davis and part of the SuiteSparse project.

Features

  • Sparse LU, Cholesky, LDL' and QR decomposition of real and complex systems
  • Fill-reducing orderings
  • Dulmage-Mendelsohn decomposition

All methods are described in detail in the excellent textbook Direct Methods for Sparse Linear Systems, SIAM, Philadelphia, PA, 2006 by Tim Davis.

Examples

Related projects

  • CSparse.Interop - Bindings to native solvers like MKL, Suitesparse, SuperLU and ARPACK.
  • CSparse.Extensions - Extension methods, dense direct factorizations and iterative solvers.

Supporters

CSparse.NET has received support/donations from the following projects:

LGPL Compliance & Building for SAInt

This repository is a fork of CSparse.NET maintained by encoord for use in the SAInt software.

Purpose

To comply with the LGPL-2.1+ license, we provide this source code along with the strong-naming key (CSparseKey.snk) used to sign the official build distributed with SAInt.

This ensures that users can modify this library, rebuild it, and replace the DLL in their SAInt installation. Because the public signing key is included here, your modified build will have the same strong name identity (Public Key Token) as the official version, allowing the signed SAInt application to load it without errors.

How to Build and Replace

If you wish to modify the CSparse library and use it within SAInt, follow these steps:

  1. Clone the Repository

    git clone https://github.com/encoord/CSparse.NET.git
    cd CSparse.NET
  2. Verify Signing Configuration The project is pre-configured to sign the assembly using CSparseKey.snk (located in the root/project folder). You can verify this in Visual Studio by right-clicking the Project > Properties > Signing, where "Sign the assembly" should be checked and set to CSparseKey.snk.

  3. Build the Project You can build using Visual Studio. We recommend building in Release mode to match the optimization of the installed software.

  4. Replace the DLL

    • Locate your new build artifact (e.g., bin\Release\netstandard2.0\CSparse.dll).
    • Navigate to your SAInt installation directory.
    • Backup the existing CSparse.dll.
    • Copy your new CSparse.dll into the folder.
    • Restart SAInt. The application will now use your modified library.

License

CSparse: a Concise Sparse Matrix package.

Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.

SPDX-License-Identifier: LGPL-2.1+

This library is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free Software
the Free Software Foundation; either version 2.1 of the License, or (at your option)
any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin
Street, Fifth Floor, Boston, MA  02110-1301 USA