// Copyright (C) 2008-2012 National ICT Australia (NICTA) // // 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 // file, You can obtain one at http://mozilla.org/MPL/2.0/. // ------------------------------------------------------------------- // // Written by Conrad Sanderson - http://conradsanderson.id.au // Written by Ryan Curtin // Written by Matthew Amidon //! \addtogroup SpRow //! @{ //! Class for sparse row vectors (sparse matrices with only one row) template class SpRow : public SpMat { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = true; static const bool is_col = false; inline SpRow(); inline explicit SpRow(const uword N); inline SpRow(const uword in_rows, const uword in_cols); inline SpRow(const char* text); inline const SpRow& operator=(const char* text); inline SpRow(const std::string& text); inline const SpRow& operator=(const std::string& text); inline const SpRow& operator=(const eT val); template inline SpRow(const Base& X); template inline const SpRow& operator=(const Base& X); template inline SpRow(const SpBase& X); template inline const SpRow& operator=(const SpBase& X); template inline explicit SpRow(const SpBase& A, const SpBase& B); inline void shed_col (const uword col_num); inline void shed_cols(const uword in_col1, const uword in_col2); // inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true); typedef typename SpMat::iterator row_iterator; typedef typename SpMat::const_iterator const_row_iterator; inline row_iterator begin_row(const uword row_num = 0); inline const_row_iterator begin_row(const uword row_num = 0) const; inline row_iterator end_row(const uword row_num = 0); inline const_row_iterator end_row(const uword row_num = 0) const; #ifdef ARMA_EXTRA_SPROW_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPROW_PROTO) #endif }; //! @}