Skip to content

Commit

Permalink
fix CSparse copyright and license info (LGPL, not BSD)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Oct 17, 2022
1 parent 6973afd commit 3f55a1b
Show file tree
Hide file tree
Showing 52 changed files with 156 additions and 416 deletions.
11 changes: 3 additions & 8 deletions libs/math/include/mrpt/3rdparty/CSparse/cs.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See: https://www.mrpt.org/License |
+------------------------------------------------------------------------+ */
// CSparse/cs.h: include file for CSparse
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#pragma once
#include <stdlib.h>
#include <limits.h>
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_add.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_add: sparse matrix addition
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* C = alpha*A + beta*B */
cs *cs_add (const cs *A, const cs *B, double alpha, double beta)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_amd.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_amd: approximate minimum degree
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* clear w */
static int cs_wclear (int mark, int lemax, int *w, int n)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_chol.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_chol: sparse Cholesky factorization
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* L = chol (A, [pinv parent cp]), pinv is optional */
csn *cs_chol (const cs *A, const css *S)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_cholsol.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_cholsol: x=A\b using a sparse Cholesky factorization
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* x=A\b where A is symmetric positive definite; b overwritten with solution */
int cs_cholsol (int order, const cs *A, double *b)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_compress.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_compress: convert triplet to sparse compressed-column
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* C = compressed-column form of a triplet matrix T */
cs *cs_compress (const cs *T)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_counts.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_counts: column counts for sparse Cholesky
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* column counts of LL'=A or LL'=A'A, given parent & post ordering */
#define HEAD(k,j) (ata ? head [k] : j)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_cumsum.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_cumsum: cumulative sum
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* p [0..n] = cumulative sum of c [0..n-1], and then copy p [0..n-1] into c */
double cs_cumsum (int *p, int *c, int n)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_dfs.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_dfs: depth-first search
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* depth-first-search of the graph of a matrix, starting at node j */
int cs_dfs (int j, cs *G, int top, int *xi, int *pstack, const int *pinv)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_dmperm.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_dmperm: Dulmage-Mendelsohn permutation
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* breadth-first search for coarse decomposition (C0,C1,R1 or R0,R3,C3) */
static int cs_bfs (const cs *A, int n, int *wi, int *wj, int *queue,
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_droptol.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_droptol: drop small entries from a sparse matrix
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
static int cs_tol (int i, int j, double aij, void *tol)
{
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_dropzeros.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_dropzeros: drop zeros from a sparse matrix
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
static int cs_nonzero (int i, int j, double aij, void *other)
{
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_dupl.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_dupl: remove duplicates from a sparse matrix
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* remove duplicate entries from A */
int cs_dupl (cs *A)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_entry.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_entry: add an entry to a sparse matrix in triplet-form
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* add an entry to a triplet matrix; return 1 if ok, 0 otherwise */
int cs_entry (cs *T, int i, int j, double x)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_ereach.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_ereach: find reach of a set of nodes in graph of L
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* find nonzero pattern of Cholesky L(k,1:k-1) using etree and triu(A(:,k)) */
int cs_ereach (const cs *A, int k, const int *parent, int *s, int *w)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_etree.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_etree: compute the elimination tree
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* compute the etree of A (using triu(A), or A'A without forming A'A */
int *cs_etree (const cs *A, int ata)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_fkeep.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_fkeep: keep or drop entries from a sparse matrix
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* drop entries for which fkeep(A(i,j)) is false; return nz if OK, else -1 */
int cs_fkeep (cs *A, int (*fkeep) (int, int, double, void *), void *other)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_gaxpy.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_gaxpy: sparse matrix times dense vector
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* y = A*x+y */
int cs_gaxpy (const cs *A, const double *x, double *y)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_happly.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_happly: apply a Householder transformation to a vector
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* apply the ith Householder vector to x */
int cs_happly (const cs *V, int i, double beta, double *x)
Expand Down
11 changes: 3 additions & 8 deletions libs/math/src/CSparse/cs_house.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Copyright (c) 2005-2022, Individual contributors, see AUTHORS file |
| See: https://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in https://www.mrpt.org/License |
+---------------------------------------------------------------------------+ */
// CSparse/Source/cs_house: create a Householder transformation
// CSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
// SPDX-License-Identifier: LGPL-2.1+
#include "cs.h"
/* create a Householder reflection [v,beta,s]=house(x), overwrite x with v,
* where (I-beta*v*v')*x = s*e1. See Algo 5.1.1, Golub & Van Loan, 3rd ed. */
Expand Down
Loading

0 comments on commit 3f55a1b

Please sign in to comment.