Skip to content

Commit

Permalink
Use SPDX license identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-jones committed Jun 26, 2024
1 parent 45dac49 commit 1592ecf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
6 changes: 6 additions & 0 deletions include/cramer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

#pragma once

#include <matrix.h>
#include <vector.h>
14 changes: 13 additions & 1 deletion include/matrix.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: GPL-3.0-or-later

#pragma once

#include <vector>
#include <complex>
#include <utility>
#include <tuple>
#include <initializer_list>

namespace cramer {

Expand Down Expand Up @@ -50,6 +53,15 @@ class Matrix {
*/
Matrix(const std::vector<std::vector<T>>& values);

/**
* @brief Constructor that creates a matrix from an initializer list.
* @param rows Number of rows.
* @param cols Number of columns.
* @param values The initializer list of values to populate the matrix.
* @throws std::invalid_argument if the size of values doesn't match rows * cols.
*/
Matrix(size_t rows, size_t cols, std::initializer_list<T> values);

/**
* @brief Gets the number of rows in the matrix.
* @return The number of rows.
Expand Down Expand Up @@ -312,4 +324,4 @@ class Matrix {
Vector<T> solve(const Vector<T>& b) const;
};

} // namespace cramer
} // namespace cramer
17 changes: 1 addition & 16 deletions include/vector.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
/*
* This file is part of Cramer.
*
* Cramer is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* Cramer 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 General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* Cramer. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-License-Identifier: GPL-3.0-or-later

#pragma once

Expand Down

0 comments on commit 1592ecf

Please sign in to comment.