| SpMat_bones.hpp | | SpMat_bones.hpp | |
|
| // Copyright (C) 2011-2012 Ryan Curtin | | // Copyright (C) 2011-2013 Ryan Curtin | |
| | | // Copyright (C) 2012-2013 Conrad Sanderson | |
| // Copyright (C) 2011 Matthew Amidon | | // Copyright (C) 2011 Matthew Amidon | |
|
| // Copyright (C) 2012 Conrad Sanderson | | | |
| // | | // | |
| // This Source Code Form is subject to the terms of the Mozilla Public | | // This Source Code Form is subject to the terms of the Mozilla Public | |
| // License, v. 2.0. If a copy of the MPL was not distributed with this | | // License, v. 2.0. If a copy of the MPL was not distributed with this | |
| // file, You can obtain one at http://mozilla.org/MPL/2.0/. | | // file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| | | | |
| //! \addtogroup SpMat | | //! \addtogroup SpMat | |
| //! @{ | | //! @{ | |
| | | | |
| //! Sparse matrix class, with data stored in compressed sparse column (CSC)
format | | //! Sparse matrix class, with data stored in compressed sparse column (CSC)
format | |
| | | | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| inline ~SpMat(); | | inline ~SpMat(); | |
| | | | |
| inline SpMat(const uword in_rows, const uword in_cols); | | inline SpMat(const uword in_rows, const uword in_cols); | |
| | | | |
| inline SpMat(const char* text); | | inline SpMat(const char* text); | |
| inline const SpMat& operator=(const char* text); | | inline const SpMat& operator=(const char* text); | |
| inline SpMat(const std::string& text); | | inline SpMat(const std::string& text); | |
| inline const SpMat& operator=(const std::string& text); | | inline const SpMat& operator=(const std::string& text); | |
| inline SpMat(const SpMat<eT>& x); | | inline SpMat(const SpMat<eT>& x); | |
| | | | |
|
| /** | | | |
| * Construct a sparse matrix and insert a large number of points at once. | | | |
| * locations.row[0] should be row indices, locations.row[1] should be col | | | |
| umn | | | |
| * indices, and values should be the corresponding values. If sorted is | | | |
| true, | | | |
| * then it is assumed that the locations and values are already sorted in | | | |
| * column-major ordering. | | | |
| * | | | |
| * The size is automatically determined to be the minimum size to fit all | | | |
| * points in the locations list. | | | |
| */ | | | |
| template<typename T1, typename T2> inline SpMat(const Base<uword,T1>& loc
ations, const Base<eT,T2>& values, const bool sort_locations = true); | | template<typename T1, typename T2> inline SpMat(const Base<uword,T1>& loc
ations, const Base<eT,T2>& values, const bool sort_locations = true); | |
|
| //! Same as the other batch insertion constructor, but with manual size s
pecification. | | | |
| template<typename T1, typename T2> inline SpMat(const Base<uword,T1>& loc
ations, const Base<eT,T2>& values, const uword n_rows, const uword n_cols,
const bool sort_locations = true); | | template<typename T1, typename T2> inline SpMat(const Base<uword,T1>& loc
ations, const Base<eT,T2>& values, const uword n_rows, const uword n_cols,
const bool sort_locations = true); | |
| | | | |
| inline const SpMat& operator=(const eT val); //! Sets size to 1x1. | | inline const SpMat& operator=(const eT val); //! Sets size to 1x1. | |
| inline const SpMat& operator*=(const eT val); | | inline const SpMat& operator*=(const eT val); | |
| inline const SpMat& operator/=(const eT val); | | inline const SpMat& operator/=(const eT val); | |
| // operator+=(val) and operator-=(val) are not defined as they don't make
sense for sparse matrices | | // operator+=(val) and operator-=(val) are not defined as they don't make
sense for sparse matrices | |
| | | | |
| /** | | /** | |
| * Operators on other sparse matrices. These work as though you would ex
pect. | | * Operators on other sparse matrices. These work as though you would ex
pect. | |
| */ | | */ | |
| | | | |
End of changes. 4 change blocks. |
| 15 lines changed or deleted | | 2 lines changed or added | |
|